[Tutor] Re: CGI Question

Derrick 'dman' Hudson dman@dman.ddts.net
Tue, 9 Jul 2002 11:44:22 -0500


--GPJrCs/72TxItFYR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=
ver
| error by changing:
|   #!/usr/bin/env python
| To
|   #!/sw/bin/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=
ue
| 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=
he
| 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.
=20
| 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.

HTH,
-D

--=20
=20
A kindhearted woman gains respect,
but ruthless men gain only wealth.
        Proverbs 11:16
=20
http://dman.ddts.net/~dman/


--GPJrCs/72TxItFYR
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAj0rEuYACgkQO8l8XBKTpRQXigCgpO/f2TmPJicsc57lpBPBkyVf
dTQAn2T49OURtg2htqXPXTGI1O1He41x
=23bY
-----END PGP SIGNATURE-----

--GPJrCs/72TxItFYR--