CGI script is in plain text

Alan Kennedy alanmk at
Fri Jul 4 17:37:45 CEST 2003


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

D'oh! Missed that vitally important piece of the sentence. Sorry for
having to follow-up my own post.

Obviously, you're script is not being executed.

The best way to debug a CGI installation is to place the ""
script itself in your own CGI directory. "" is designed to be
used for exactly this purpose, and will render a HTML page with
valuable information about your python installation and web server

More importantly, "" is a script that is *known* to work.

Recommended steps:

A. Find the installed location of the python on your system
B. Copy "" from the Lib directory of that installation
C. Put it into your cgi-bin, or equivalent, directory.
D. Make sure the path on the shebang line matches the path of A.
E. Check that the necessary execute bits are set.
F: Try this URL

or equivalent.


alan kennedy
check http headers here:
email alan:    

More information about the Python-list mailing list