The following information may be useful if you're setting up CGI scripts or other applications that need to know about the location of common applications.

Location of commonly needed programs

CGI scripts written in Perl may need to know the following locations in order to function as expected.

Perl version and modules

We run the latest stable version of Perl and update regularly.

Some Perl modules are installed on our web servers by default. We are generally happy to add additional Perl modules from CPAN, so if your scripts require a particular Perl extension feel free to contact us to arrange this.

Solving potential CGI problems

Perl and CGI is reasonably straight-forward to use on our hosting service. If you run into any problems, just follow the guidelines below.

CGI can live anywhere

You do not necessarily need to create a special scripts directory for your .cgi files, although you are welcome to do so if you wish.

CGI programs can be placed in your main web directory or in any sub-directory except for a sub-directory called cgi-bin which is generally reserved for system use.

File name must end in .cgi

The file name of your Perl script must end in .cgi

No other endings will work or be recognised as Perl (so for example .pl or .exe will not be recognised).

.cgi scripts must be executable

Your Perl file must have execute permissions set for it to work.

Nearly all FTP software has the ability to change Unix file permissions, but the option you need will refer to Unix file permissions or chmod.

The correct permissions for an executable script is mode 755 or rwxr-xr-x (which translates to readable and executable by anyone but only writable by the file's owner).

If your FTP software doesn't support changing file permissions, please contact us with the exact location of your script file and we can make the permission changes for you to allow execution.

Watch out for Windows line breaks

A final common problem is that Windows FTP software can transfer scripts in binary mode event though they are actually just plain text.

This can lead to the addition of extra new line characters at the end of each line of the script which may stop the script executing properly.

To avoid this problem, try transfering any .cgi programs in "ASCII" or "text" mode rather than binary.

Last updated 07 Apr 2005

Do you have any suggestions or comments on this page?