cgi and Premature end of script headers

duncan

Verified User
Joined
Jan 19, 2005
Messages
93
Location
Halifax, NS, Canada
I have a cgi script in my cgi-bin folder and it won't run. I get a Internal Server Error 500 message.

I run the script through SSH and it works fine, so the script itself is ok.

I check the error logs and it says:
Premature end of script headers: /home/nsya/public_html/cgi-bin/test.cgi

The directory and files are chmoded 755.

The owner is "nsya" and group is apache.

Any ideas?? I feel like pulling my hair out at this point!
 
fixed.

I had to go through and make sure all the owners and grops added up.

For some reaosn some of mine were user:apache, while others were user:user

So check your public_html, cgi-bin, and script are all exactly the same.
 
Back
Top