[thelist] Perl error: formmail (revisited)

Morbus Iff morbus at disobey.com
Fri Dec 8 14:01:28 CST 2000


 >>There was also some additional information available about the error:
 >>[Mon Nov 27 16:52:33 2000] access to
 >>/u/home/d/debt/public_html/cgi-bin/formmail.pl failed for 209.208.87.4,
 >>reason: Premature end of script headers

Ok. Basically, the webserver is telling you that the script didn't send the 
right information to the webserver. In quick, metaphorical examples:

	a) To mail someone, you specify the name, address
	   and city state zip they live in. The mail
           succeeds.

	b) If you don't specify the address, then the
           mail will not succeed.

The webserver needs to know what's coming to it. I can assume that you want 
to send HTML to it. Think of HTML as the city, state, and zip. But, without 
what's called a "content-header" (or, following the slowly failing 
metaphor, the address), the webserver will cough up this error message.

It's a most frustrating one.

To "cheat", you could put somewhere near the top of the script the following:

	print "Content-type: text/html\n\n";

This tells the webserver the address/content-type of the city state 
zip/html code. Note that this is by no means a complete fix. If someone 
else in the code, that line is shown (or not needed), then you'll notice 
that extra bit of text showing up in the webpage.

You can thank me for being totally unclear. Whoo.


Morbus Iff
.sig on other machine.
http://www.disobey.com/
http://www.gamegrene.com/





More information about the thelist mailing list