irielogo.gif (1617 bytes)
Irie Tools

Irie Pascal

CGI
  Introduction
  Install
  Examples
  Links

Links

Pascal Search Engine


Join Mailing List

Do you want to receive email announcements about  important developments at Irie Tools? If so, please enter your email address below:

Apache (UNIX)

This document describes the procedure for executing Irie Pascal CGI applications on Apache web servers. It is assumed that you have already installed a copy of the Irie Virtual Machine (IVM) interpreter on the web server.

Configuring Apache

First you need to configure Apache to recognize CGI applications. One popular choice is to configure Apache so that it assumes any file ending with .cgi is a CGI applications. Then you can make your Irie Pascal CGI applications 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 applications. For detailed information on how to configure Apache web servers go to the Apache home page, or try one of the recommended books at the end of this page.

Inserting the #! header

Next you need to tell UNIX where to find the interpreter it needs to run your CGI applications. This is done by putting a header like

      #!pathname

where

     "pathname" is the full pathname of the IVM interpreter

in front of each of your Irie Pascal CGI applications. So for example if the interpreter is installed in /usr/local/irie then you need to put the following header

#!/usr/local/irie/ivm

in front of each application. The #! header can be inserted by the IDE, the command-line compiler or by the Irie Pascal Header utility. Detailed information about this can be found in the Irie Pascal User's Manual, which is available here.

Uploading your CGI applications

If you are using a remote web server then you need to upload your CGI applications to the web server. Remember to always upload in binary mode.

Making you CGI applications executable

Finally you need to make your application executable, for example you could use

chmod 755 hello.cgi

or

chmod a+x hello.cgi

(replace hello.cgi with the name of your CGI applications)


Recommended Books


Next > Examples