Using CGI (Common Gateway Interface) programs


What is CGI?
CGI (Common Gateway Interface) programs provide an interface between your AAPT Web site and its visitors. For example, you may ask visitors to your site to complete an online questionnaire to assist with market research. A cgi program will collect the data submitted via the form and deliver it to you.

You may use cgi programs written in scripting languages such as perl and UNIX shell programs on your AAPT Web site. All CGI programs must be saved in your cgi-bin directory.

Please be aware that, for security and to protect system resources, your own binary files are not permitted and AAPT reserves the right to remove any binary file without notice.

For information about Perl, see The Perl Institute. For information about Python, see the Python Language Home Page.

About the provided CGI programs


AAPT provides the following CGI programs with all AAPT Web accounts:

Troubleshooting for cgi programs
If your cgi script is running properly from shell but not from your browser check the following:

Ensure that your permissions are set correctly. For the script to be accessible the permission should normally be 755. The seven means the owner has read, write and execute access. The first five means the owner,s group has execute and read access and the third five means the world has execute and read access.

If your cgi program is written in Perl, ensure that the first line contains the correct path for PERL. The path is /opt/local/bin/perl.

Before any print commands in the script you must specify the content type, for example, print "Content-type:text/html\n\n";

Finding more information about CGI


There are many online resources to assist with CGI programming, for example:

The NCSA HTTPd Home Page  offers some introductory information about CGI and an archive of sample programs.

 

 




Copyright © AAPT Limited