httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: Please add a solution to the FAQ
Date Thu, 08 Dec 2005 14:26:05 GMT


Michel Hendriks wrote:
> Hi,
>  
> Could someone please add some extra info to the explanation on the 
> "Premature end of headers" ? found at 
> http://httpd.apache.org/docs/1.3/misc/FAQ-F.html#premature-script-headers
>  
> As it turns out I lost a couple of hours trying to figure out why my 
> script would not run under Apache 1.3 while the answer was really, 
> really simple.
> Apache 1.3 apparently also outputs the "Premature end of headers" 
> warning if the script or its directories are not owned by the correct user.
> So all I needed to do was change the ownership of directoies and the 
> script to the user I was trying to run it under and all of a sudden it 
> worked!
>  
> Maybe you could save someone else the same agony by adding this to the 
> answers?

Actually, I'm pretty sure that your problem is either your script 
crashing because of bad permissions on files it uses, which is document: 
"Even if the CGI runs fine from the command line, remember that the 
environment and permissions may be different when running under the web 
server. The CGI can only access resources allowed for the User and Group 
  specified in your Apache configuration."

Or a problem related to suexec, which is documented:
"In addition, a configuration problem in suEXEC, mod_perl, or another 
third party module can often interfere with the execution of your CGI 
and cause the "premature end of script headers" message."

Bad permissions on the script itself in the absence of suexec would not 
give that error message.

I appreciate the suggestion, but I don't think it is perfectly accurate 
so it may be more misleading that what we have now.

Joshua.

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message