Error while running CGI Script

This CGI script has failed to run correctly. This may be caused by permissions problems, or by an error in the script.

When the server runs a CGI script, it runs it under your own user ID. To ensure that nobody else can run things under your ID some safety checks are first performed. If any of those fail you will get this error page. The checks you need to be aware of are these:

  1. The directory that the script is in is owned by you.
  2. The directory that the script is in is not writable by anyone but you (these permissions are often expressed as -rwxr-xr-x or 0755)
  3. The script is owned by you.
  4. The script is not writable by anyone but you and is executable (-rwxr-xr-x or 0755)
Generally your files and directories will always be owned by you. The file permissions are the thing to check.

The other frequent cause of this error is that the CGI gave an error message without giving HTTP headers first. It is helpful to put the HTTP headers as close to the top of your program as possible so that errors will be displayed instead of this page.