Recent Changes - Search:

Softwares

.

Premature-End-of-Script-Headers-Error

Main.Premature-End-of-Script-Headers-Error History

Hide minor edits - Show changes to output

August 31, 2007, at 07:30 PM by 125.21.38.36 -
Added lines 1-31:
%blue%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 or /usr/local/apache/log/suexec.log file that should give a solution.

Reference: http://httpd.apache.org/docs/1.3/suexec.html

*Upload your Perl script in ASCII mode.

*Set the permission of the file to 755, which allows the script to be executed by everybody.


%green%Tracking Errors in the Script

perl -wc helloworld.pl

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

%green%Running it without the syntax check options:

perl -w helloworld.pl

Edit - History - Print - Recent Changes - Search
Page last modified on August 31, 2007, at 07:30 PM