[Tutor] Re: CGI Question
Derrick 'dman' Hudson
Tue, 9 Jul 2002 11:44:22 -0500
Content-Type: text/plain; charset=us-ascii
On Tue, Jul 09, 2002 at 07:40:04AM -0500, SA wrote:
| I've now managed to get the script to work part way. I got rid of the ser=
| error by changing:
| #!/usr/bin/env python
That is correct. See my post from a minute ago that explains how the
'env' trick works, and why it doesn't work in a CGI environment.
| So this fixes the server error. I then set the program to display the val=
| for the key "pageID", but what I get is a blank page. This makes me wonder
| if the value is being passed to the key? Once again the href portion of t=
| html is:
Is the page really blank? Use the "view source" option in your
browser to find out. Another helpful tool is 'tcpflow', so you can
watch the HTTP-level interaction between the browser and the server.
| Any ideas on what I'm doing wrong and why the script is not receiving the
| value 'testtext'?
Look in apache's error log. If you had an exception or some other
error, it will be shown there.
Another useful tool is the 'cgitb' module. It hooks into the
interpreter to catch any exceptions and give you a nicely formatted
stack trace in your browser.
A kindhearted woman gains respect,
but ruthless men gain only wealth.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----