My CGI scripts do not work.

By DigitalPulseHosting.com
2004-06-20 00:39:25
Trouble-shooting methods to solve some of the common CGI script problems.

Before contacting us, please make sure that you have checked the following, as these are the most common reasons why CGI scripts fail to work.
  • Make sure your scripts are in the cgi-bin folder.
  • Make sure the permissions are set correctly. Web site files are set to the read permission because that is all a visitor should be able to do. However, CGI scripts must be able to execute as well.  Chmod the script 755 or whatever the script's documentation calls for.

    You can set permissions with most FTP programs. For example, in the WS_FTP program. Click once with the left mouse button to select the cgi script file, then right click on the file and choose "chmod (UNIX)" (change mode) from the menu. The standard permissions for a CGI script are:

Owner:

Read

Write

Execute

Group:

Read

 

Execute

Other:

Read

 

Execute

  • Check the path to the CGI in your web page - the path must include the cgi-bin directory (e.g., /cgi-bin/myscript.cgi).
  • Make sure the extension of your CGI script is .pl or .cgi - these are the only two extensions that will run on our system.
  • Make sure that you uploaded the CGI scripts in ASCII (plain text) format. CGI scripts uploaded in the BINARY format will not execute properly.
  • If you downloaded the CGI script from another site, make sure you download in the ASCII format. We recommend downloading CGI files through FTP rather than through a browser, because many browsers download in BINARY format.
  • Make sure that the paths in your CGI code is pointing to the correct libraries on our system.  A list of the paths to common programs can be found under the "Scripting" category in the Knowledge Base.

    NOTE: While we will try make sure the latest PERL versions and most common libraries are available to our clients, we do not provide custom CGI scripting nor can we debug CGI code. Please consult the readme and help documents from the script author.
return to top