System Status
Everything's OK All of our systems are online and fully functional. Find out more
You are here:
Scripting with Perl & PHP
Troubleshooting common Perl issues
Here are some common problems and solutions you may find useful once you start scripting with Perl.
If your web browser simply displays the source code of your CGI script this indicates that the web server didn't know how to process it. The most common causes are incorrect file permissions (see below) or the script is not in the cgi-bin folder.
The top cause of this error is incorrect permissions on a script or directory. Directories that contain web content (including cgi scripts) must be mode 755. CGI scripts must also be 755.
The script interpreter is defined on the first line of the script after the #! and must exist on the server. This is usually perl and needs to be '/usr/bin/perl'. These paths can vary from system to system and it's important to ensure that they're correct for this server.
Text files are slightly different between Unix and Windows platforms. If you upload in ASCII mode, the ftp server will translate the files to Unix mode for you if necessary. If you upload in binary mode, it won't. CGI scripts are one of the few places on web servers where this difference actually matters.
CGI scripts must output HTTP headers. If you're using Perl, you must do it yourself or use a helper module to do it for you. You must also ensure that the headers are always the first output generated by the script. It's not uncommon for test or debugging code to output a message before the headers and that will cause the server to treat the script as broken.
This error will be generated if scripts have syntax errors and don't actually run successfully. You should obtain the relevant interpreter for your script and try to run it before uploading as this is the easiest way to ensure that there are no syntax errors.
Perl scripts will usually die with an error if a module the script requires is not installed. If you suspect a module you require is not installed, please contact support.
If you've checked all of these things and can't fix the problem, our support staff will be able to find out more specific details of the actual problem and give you more detailed information on how to resolve it.
Everything's OK All of our systems are online and fully functional. Find out more
Any questions? email or call +44 (0)1438 342 490
Stay in touch: