View Full Version : Do you know what this error means?
Nfau
May 29th, 2001, 20:19
[Tue May 29 12:54:22 2001] [error] [client 203.54.XX.XX] Premature end of script headers: /home/XX/www/downloads/filereview.cgi
fatman
May 29th, 2001, 21:53
Before a script can print any text to the visitor's browser, it needs to issue at minimum certain HTTP headers: either a Content-type header or a Location header (and others if you want). Is it possible that either these headers were not issued prior to printing text or that somehow or other the headers were malformed (or the process was terminated), etc?
KapTinKiRk
May 29th, 2001, 23:09
Can you post the code (or at least the header) so we can see exactly whats wrong?
Nfau
May 30th, 2001, 17:49
#!/usr/bin/perl
require "filereview.setup";
use CGI;
$q = new CGI;
$cat = $q->param('category');
if($cat){ $link_file = "$filedir/$cat.dat"; }
else { $link_file = "$filedir/$default.dat"; }
&category;
&search;
open(BRAVO, "$link_file");
if ($display == 1) { @johnny = reverse(<BRAVO>); }
if ($display == 0) { @johnny = (<BRAVO>); }
close(BRAVO);
print "Content-type: text/html\n\n";
print &Template("$templatedir/display_top.html");
lucifer
May 30th, 2001, 18:00
I'd change the last line to
print "hello";
then try it
if that works then you know the problems in the template function?
atlas
May 30th, 2001, 21:41
Place the print statement for the Content-type header at the top of the script.
It's possible that your other subroutines are attempting to print before that.
-mk
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.