CGI script is in plain text
Alan Kennedy
alanmk at hotmail.com
Fri Jul 4 11:37:45 EDT 2003
BMA TRADING wrote:
>>>> 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 "cgi.py"
script itself in your own CGI directory. "cgi.py" 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
environment.
More importantly, "cgi.py" is a script that is *known* to work.
Recommended steps:
A. Find the installed location of the python on your system
B. Copy "cgi.py" 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
http://yourdomain.com/cgi-bin/cgi.py
or equivalent.
HTH,
--
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