Installing Irie Pascal CGI programs on Apache (for UNIX web servers)

Install the IVM

Remember to install the Irie Virtual Machine (IVM) interpreter on the web server, before installing any Irie Pascal CGI programs.

Configuring Apache

First you need to configure Apache to recognize CGI applications.

  • One popular way to do this is to configure Apache so that it assumes any file ending with .cgi is a CGI program. Then you can make your Irie Pascal CGI programs end with .cgi and Apache will recognize them.

  • Another popular choice is to configure Apache to assume that all files in a particular directory (e.g. /cgi-bin) are CGI programs.

    For detailed information on how to configure Apache web servers, go to the Apache home page.

Inserting the #! header

Next you need to tell UNIX/Linux where to find the interpreter it needs to run your CGI programs. This is done by adding this special header to the front of your program

#!pathname

where

"pathname" is the full pathname of the IVM interpreter.

So for example if the interpreter is installed in /usr/local/irie then you need to add the following header:

#!/usr/local/irie/ivm in front of your programs.

The #! header can be inserted by the IDE (Windows edition only) (see Miscellaneous options), or by the command-line compiler (see the -h compiler option).

Detailed information about this can be found in the Irie Pascal User's Manual.

Uploading your CGI programs

If you are using a remote web server then you need to upload (i.e. transfer) your CGI programs to the web server.

Remember to always upload in binary mode.

Making you CGI programs executable

Finally you need to make your programs executable. You can do this either by:

  • chmod 755 hello.cgi or
  • chmod a+x hello.cgi

    Replace hello.cgi with the name of your CGI programs.