Install Python on Apache

Rikard Bosnjakovic rikbo716 at student.liu.se
Sat Mar 24 01:31:53 EST 2001


Sharp wrote:

> (cgi.bin is set to the right place because php and perl do work)
...
> [Fri Mar 23 15:54:50 2001] [error] [client xxx.xxx.xxx.xxx] Premature end of
> script headers: c:/web/cgi-bin/python/python.exe

What you need to do with CGI-scripts is to send headers before the
actual CGI is run. The headers tell what kind of data the script will
send. To send a header, you just need a "Content-type: <your type>\n"
before the rest of the output.

In your case, you are sending html-tags. Thus add a print "Content-type:
text/html\n" as first CGI-statement.


-- 
Rikard Bosnjakovic - http://a214.ryd.student.liu.se/cv/ - ICQ: 1158217

Anyone sending unwanted advertising e-mail to my address will be
charged $250 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.



More information about the Python-list mailing list