Common CGI Problems and How To Fix Them

If you've ever tried installing a CGI or Perl script on to your server, then you're probably familiar with the following situation: you've found a great script, followed the instructions, uploaded it to your server, and now quivering with gleeful anticipation you load up your web browser, point it to the right address and... bang, there isn't your script, instead you've got a cryptic error message such as "Error 403", "Error 500", "Internal Server Error" or something else completely unexpected.

Preventing Problems

First of all there are some guidelines that you should always follow when you are uploading or installing CGI scripts on a server. Follow these and your life will be much easier!

Before you upload

When you upload:

It's not working. What do you do now?

The first, and simplest error message to cure is the old, familiar "Error 404". The standard web "file not found" error message. All this means is that the server can't find the file that you're looking for. This is most likely down to one of two reasons:

Most other errors fall into two different categories, either because your host/server has placed certain restrictions on how CGI programs can be run or errors with the installation, configuration and execution of the script.

Restrictions imposed by your webhosting company or your webserver. Before attempting to install and run CGI programs you should check with your host to see that they allow CGI and check their specific conditions. If you are running your own server then you should check your documentation and ensure that you have all of the relevant software set up properly (as a minimum you will need to have both a web server and a version of Perl (version 5 as a minimum) installed and running on the machine that you are using as a server). Once you have the relevant details check the following:

Other common error codes and what they mean

So you've followed all of the guidelines above and you're still getting errors, this is what they mean: