SimplyWebHosting.com KnowledgeBase Glossary    Contact Us
Search  
   
Browse by Category
SimplyWebHosting.com KnowledgeBase .: CGI and/or PERL Issues .: Troubleshooting PERL Script Errors

Troubleshooting PERL Script Errors

If a PERL script does not execute correctly check the following:

1) Upload the file in ASCII mode.

2) Make sure the PERL script is uploaded to the cgi-bin directory.

3) Set the PERL script's permissions to 755

4) On a VPS, make sure your site's cgi-bin directory is set to 755 permissions. Any other set of permissions (including 777 permissions) is likely to result in the "Premature end of script headers" error message.

5) If you have access to a Linux shell prompt for the site, try executing the command:

perl c filename.pl

This will check the PERL script for correct syntax, as well as help determine if the file was uploaded in binary mode.

6) If you have access to a Linux shell prompt for the site, execute the script. If your working directory is the directory the script is in, execute the following command to execute the script:

./filename.pl

7) Check the Apache error log for the site. Frequently there are clues to why the script is not executing correctly in the Apache error log.

8) Check the size of your log files. If the /var/log/httpd/suexec.log is 2 GB in size your perl scripts will return a "Premature end of script headers" error message.


In the above examples, replace "filename.pl" with the actual name of your PERL script.


How helpful was this article to you?

Related Articles

article Premature end of script headers
See the following...

(No rating)  10-18-2005    Views: 4922   
article How should I set up the paths within my perl CGI scripts?
Use the following command from a shell prompt...

  7-11-2005    Views: 7851   
article Troubleshooting PHP Scripts
If you cannot figure out the problem with your...

  1-19-2006    Views: 11337   

User Comments

No comments have been posted.


.: Powered by Lore 1.5.4
Copyright 2005-2014 Advantagecom Networks, Inc.
SimplyWebHosting.com - Xen Linux Virtual Private Servers (VPS) - Paypal Accepted