CGI script is in plain text

Alan Kennedy alanmk at
Fri Jul 4 16:36:11 CEST 2003


>>> When  I start CGI script from a web browser, the result is
>>> plain text( the copy of that script)

Ian Bicking wrote:

>> Try renaming the file to .cgi -- as long as the #! line is right, it
>> doesn't matter the extension.  Also, you may have to put the script in
>> the cgi-bin directory.


> Thank you for your reply.
> I tried to rename it but it does NOT work.
> In the same directory I can successfully run Perl script( .pl
> extension) but no Python scripts. Any idea?

Quick sanity check: You are sending a content-type from the script?
e.g. you have code like this in your script?

print "Content-Type: text/html; charset=iso-8859-1"

alan kennedy
check http headers here:
email alan:    

More information about the Python-list mailing list