httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: [users@httpd] Another "Premature end of script" headers problem
Date Wed, 19 Nov 2008 10:20:55 GMT
Dan Yamins wrote:

> Sometimes -- only _sometimes_ -- when the script invokes the "draw" method,
> I get a "premature end of script headers" problem, with error code 500.
> Because the .draw method is outputing a file to disk, it seems like it might
> be a permissions-related problem. 
In my opinion, that would be unlikely, since it sometimes works, and 
sometimes not, and I guess the output file is always being written in 
the same place, no ?

But I can't figure out what t is easily,
> becuase the problem only happens occasionally.  Moreover, when it happens,
> if I just hit "refresh" on the browser to run the script again, then it
> usually runs fine.    I haven't been able to figure out more than this.
"premature end of script headers" happens when the cgi-bin script 
crashes before it has even started to send back a response to the browser.
So I guess your best option would be to add some logging into your 
script, and try to figure out when it crashes and for what reason.
Whatever your cgi-bin script prints to STDERR will usually find its way 
into the Apache error log for that server.
Do not print logging messages to STDOUT, or this will cause the 
"premature end of script headers" all by itself.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message