How to fix a blank page or other errors when running Perl scripts
Posted by Support on 10 December 2008 04:41 PM
If you are running CGI Perl scripts on our linux servers and are getting errors or just a blank page try doing the following.

Add a "-w" to the end of the first line of your Perl script.
i.e. Change the first line from "#!/usr/bin/perl" to "#!/usr/bin/perl -w".

- Make sure your script has the same user/group ownership as your cgi-bin folder and the rest of your account, which should be your FTP username for both the user and the group.
- Directory permissions: Your cgi-bin directory should be chmodded as 0755, not 0777.  Similarly if your script is at .../cgi-bin/foo/bar.cgi, the foo directory must not be world-writable (0777).  This is because many servers will refuse to execute CGI scripts within world-writable directories, as a security precaution.
- File permissions: your CGI script itself must also be 0755 and not 0777, for the same reasons.
(575 vote(s))
Not helpful

Comments (0)