Home TroubleshootingOperating System Premature end of script headers in perl script

Premature end of script headers in perl script

by Benny

‘Premature end of scrip headers’ error message refers to the script being stopped for whatever reason before it actually return any output to the browser.

The first time to check is to ensure the below codes are output first

print "Content-type: text/html\n\n";

And then to debug the error, simply add the below line(preferably after the above code).

use CGI::Carp qw(fatalsToBrowser);

You may also like

Leave a Comment