

|
 |
CGI Scripts
CGI scripts are programs that perform functions on a website. Bulletin boards, guest books, and FormMail are some examples of CGI scripts. Quality CGI scripts have
documentation or README files that will help you set up the script. We do not provide technical support for CGI scripts, but the following information may be helpful.
Check the System Configuration
Check the Script
Check the Page that Calls the Script
Further Assistance
TOP
Is the Perl ValueApp installed?
If you are using a CGI script that is written in Perl, you will need to make sure that the Perl ValueApp is installed in your VDS Manager.
TOP
Do you have the correct paths to Perl and Sendmail?
Your CGI script may call Perl and Sendmail. You must make sure that you have the correct paths in order for your scripts to work.
Path to Perl: /bin/perl
Path to Sendmail: /bin/sendmail
If you are calling a CGI script securely and you are using a shared certificate, you must use different paths.
SSL Path to Perl: /usr/local/bin/perl OR /usr/bin/perl
SSL Path to Sendmail: /usr/lib/sendmail
TOP
Did you upload the script to your cgi-bin?
Your cgi-bin is a special directory located inside your "www/" directory which is configured to handle CGI scripts. CGI scripts which are located inside the cgi-bin are run. CGI scripts
which are located outside the cgi-bin are displayed as text in the browser.
TOP
Did you upload the script in ASCII instead of Binary?
HTML pages, text files, CGI scripts, and anything that you can view with a text editing program should be transferred in ASCII mode or it may corrupt the file.
Image files such as gifs, jpegs, zip files, executable files, Shockwave files, etc should be transferred in BINARY mode.
The majority of publishing and FTP utilities, like Dreamweaver and FrontPage, are automatically set to determine whether a file should be uploaded in binary or ASCII, but there
are exceptions. If you are uncertain as to how to change these settings, please consult the instructions which came with your program.
TOP
Is the script set with executable file permissions?
Scripts that need to be executable should have their permission set with "chmod 755". This sets the file's permissions so that the owner may read, write, and execute the file; and
anyone else can only read and execute it.
Your FTP or SSH client will have instructions describing how to change the permissions of a file. For instructions on chmod through the command line or through
WSFTP, click here.
TOP
Do you have the right path to your script?
Check the page(s) on your website that call the script and make sure that you have the correct path to the script.
Even though the cgi-bin is located outside of your web directory (www/htdocs), there is an alias set up which will allow you to call scripts as if the cgi-bin was located with your
other web files.
For example, if you wish to call the file from your main index.html page, you would use "cgi-bin/your_script.pl".
TOP
Obtaining Support for CGI Scripts
We do not provide technical support for CGI scripts, but many of the better quality scripts have other options:
- Check for a README file.
- Search the website where you obtained the script.
- Read any definitions in the configuration file.
- Ask others who have used the script.
TOP
Resources for Learning CGI Scripting
Matt's Script Archive
If you just want good scripts without having to write them, try here. Some modifications are usually necessary, which Matt explains in his "readme" files.
The Common Gateway Interface
NCSA provides a lot of helpful information about CGI here. It also has a good introduction to forms.
Server-Side Includes
Basic overview of Server-Side Includes. (SSI).
Using ISINDEX for Server-Side Searches
Explains how to write a CGI script to perform simple text searches on your web server.
 |
CGI Programming with Perl
Explains how to use the common gateway interface (CGI) to create and deliver dynamic content on the web.Topics include incorporating JavaScript for form validation, making
CGI scripts secure in Perl, working with databases, creating simple search engines, and improving performance of CGI scripts.
|
 |
CGI Programming 101
A concise presentation of the key elements of Perl CGI, which makes it perfect for programmers who are under the gun. If you need to get up to speed on text strings, for example,
you can read that chapter and be a pro within about 10 minutes.
|
TOP
|