You are most likley not printing your header first before anything else is being printed.
in reply to Re: Apache CGi's
in thread Apache CGi's
A header would be like
If your code is erroring then what is getting printed might be going to the browser and causing this error -- you can check your error logs to see if this is happening.
print "Content-type: text/html\n\n" or
Another quick check type of thing is to do a print as the first thing:
and then let the rest of the existing code execute; if your code is erroring you will see it show up in plain text in the browser. Also you can see when your expected header is coming out and if anything is being printed before that.
print "Content-type: text/plain\n\n"