Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

perl scripts ending in premature end of headers on rh9 apache

Status
Not open for further replies.

Zippyflyer

Technical User
Aug 17, 2003
44
US
using apace all scripts that i try and run from my cgi-bin fail with premature end of headers. These are scripts not written by me and work on my windows xp apache install, the path to perl exists and all permissions are set to 777 on perl interperter, the script, the cgi-bin

im at a loss as to what is causing this - new to linux, any help greatly appreciated. Also tested a simple hello world cgi script with the same result.
 
try running 'dos2unix' on them. windows uses different line endings than *nix. open the scripts in a text editor and see if there's a ^M at the end of the lines. if so, dos2unix should fix them.

----
JBR
 
Premature end of headers implies that you are trying to set cookies through headers but you've sent some kind of non-header string through to the browser before that.

First, undo all that 777 permissions and on cgi-bin. That's just plain dangerous and isn't probably related.

Have you tried a simple "hello" .html script to make sure that Apache is OK?

Do you have any special modules running in Apache that would automatically be setting cookies?

Is your perl install for Apache using mod_perl?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top