Premature End Of Script Headers Error

Apache Add comments

Sample hello world script

#!/usr/local/bin/perl
# hello.pl — my first perl script!
print “Content-type: text/html\n\n”;
print “Hello, world!\n”;
——————————————–

* Check domain/apache error log file.
* Check /var/log/apache/suexec.log file that should give a solution.
* Upload your Perl script in ASCII mode.
* Set the permission of the file to 755, which allows the script to be executed by everybody.

Tracking Errors in the Script

perl -wc helloworld.pl

Will cause the Perl interpreter to check your script for syntax errors.

Running it without the syntax check options:

perl -w helloworld.pl

* If something strange has gone wrong with your program and youâre not sure where you should look for help, try the -w switch first. It will often point out exactly where the trouble is.




Leave a Reply

Wordpress Themes by Natty WP. Web Hosting
Images by our golf tips desEXign.