Using the Mocka Modula-2 compiler for making CGI executables.

When browsing the web on the pages of a Modula-2 friend (Christoph), I read about making CGI executables with the XDS Modula-2 compiler. Now I just -love- Modula-2, but another flavor... :o)
My flavor is not vanilla, but chocolate. So I try to make my programs with the Mocka Modula-2 compiler. Read all about it in the Mocka section (check it out in the navigator frame on the right).

The Mocka compiler is good for people like me: I like developing MODULES (both the IMPLEMENTATION and the DEFINITION kind). If you have the same obsession, follow me.
If, on the other hand, you need ready made MODULES for developing applications, your best choice will be the XDS compiler.

Anyway, this section is about making CGI executables with the Mocka Modula-2 compiler. Compiled programs operate lightning fast. Much faster than Perl and PHP scripts. The disadvantage is that a compiled CGI executable will not run on a non-Linux server... So if your host runs "Windows ServerThingy 2007.5" and you install one of these CGI executables in your 'cgi-bin', the consequences can be dramatic.
In the best case, the server will reset itself. But it also might get caught in an infinite loop and need operator intervention to get out of it. In any case: these programs and sources are GPL! Read about the GPL license by clicking on the link in the navigator.

CGI projects with the Mocka compiler.

Below you see a list with CGI related projects I made with the Mocka Modula-2 compiler. If you want to know more of a specific project, just click on the related link in the navigator.
Have fun. If you find a dead link or other error in the site or the software, please send me a short E-mail describing the problem and I will try to fix it ASAP. Send your mail to the address in the navigator frame.

New CGI module

Started work on a webshop controller for a KISS webshop.

New CGI module

Started work on a new cgi library to fit in with my desire to make a simple webshop.

404 handler

Due to the remaking of the framestomper I decided to make a smart 404 handler that not only tells me that I made a mistake, but that also redirects me to the most probable webpage.

New framestomper

Due to an attack by Croatian volunteers (or mercenaries) I felt obliged to improve the framestomper beyond the original targets. It already was supersafe. It's now extremely safe.

Old CGI module

At long last: the source of the CGI module that is used in some sources: cgi library file.

Data files

Bigger and more complex CGI files need to read from and write to disk. Read more about it in the datafiles.html file.

Infinite loop

What happens when a CGI executbale enters an infinite loop, without emitting any further data? See what happens in the loop.html page. The outcomes were a happy surprise to me.

Frame Stomper

In order to get my webpages always in identical form on screen, I needed a way to detect if an HTML file was framed or not. And if not, I needed some executable to add the frames, around this specific subframe. Read in framestomper.html how I did it. And it works! So I can make my webpages easier and more constant for the viewers.

MailCGI

This is the setup for making a trusty E-mail repplacer. Instead of the familiar 'mailto' anchor, the user creates a page similar to post.html and uses the mailCGI executable to transform the entered data into an E-mail which is sent to the owner of the website. Since this is a compiled executable, it runs much faster than equivalent written in Perl or Python. And it cannot be tampered with by malicious minds. And it is written in Modula-2, so buffer overruns are not possible.
As for now, the program only lists the data on screen.

TestForm

The TestForm initiative is a set of HTML forms to test and debug the CGI executables that are being made in this project. But of course you are free to use these files on your own systems for checking your own home made CGI scripts.
Please pay attention to the URL of the CGI-action software. Let this always point to an executable on your own computer system. If you leave in my copy of 'testCGI' (which runs on my webhost) you may not get the response you would like to have.
My 'testCGI' executable may change without prior notice from me. So don't count on it staying as it is now (1 September 2004).

testCGI

testCGI will show all the CGI environment variables in an HTML formatted webpage. Just run the program to see which parameters are available. Change the URL by means of the '?' operator and see how that affects the output of testCGI.

GetEnv

GetEnv (the program is called 'trye' for lazyness reasons) is a program to get your feet wet with accessing Unix environment variables from within a running executable.
It is the prelude for a series of programs to be stored in the 'cgi-bin' to get rid of those nasty perl scripts.

Page created in 2004,

Page equipped with googleBuster technology