[Tutor] Python in Apache?

Victor R. Cardona vcardon@siue.edu
Thu, 24 Jan 2002 15:06:01 -0600


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

On Thu, Jan 24, 2002 at 12:59:24PM -0800, Israel Evans wrote:
>=20
> 	Has anyone here ever attempted to get Python cgi=20
> files to run in an apache server?  I seem to be having=20
> trouble though everything looks right and I don't know=20
> whether it's python or apache that's causing me problems.

It works just like any other CGI script.

> ######################################
>=20
> #! % python
>=20
> header =3D "Content-type: text/html\n\n"
> content =3D "Hello, Baby."
>=20
> print header, content
>=20
> ######################################

That should work.

> I get the following error message:
> ####################################
>=20
> Internal Server Error
>=20
> The server encountered an internal error or=20
> misconfiguration and was unable to complete your request.
>=20
> Please contact the server administrator, Israel@lith.com=20
> and inform them of the time the error occurred, and anything=20
> you might have done that may have caused the error.
>=20
> More information about this error may be available in the=20
> server error log.

What does the log say? The http-errors log will actually list the python
error messages. At least it does on UNIX.

-v
--=20
Victor R. Cardona
Powered by SuSE Linux 7.1 (i386) Professional
GPG key ID E81B3A1C
Key fingerprint =3D 0147 A234 99C3 F4C5 BC64  F501 654F DB49 E81B 3A1C

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

iD8DBQE8UHc5ZU/bSegbOhwRAji9AKCAp8WX+HwKgum7sl/gujfzATub+gCgjoNq
eCPpQozNt1r5VvUebcPzatk=
=5Mw3
-----END PGP SIGNATURE-----

--l76fUT7nc3MelDdI--