CGI script is in plain text

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


BMA TRADING wrote:

>>> 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.

BMA TRADING wrote:

> 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"
print

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list