Still need more feedback Re: Successful installation of mod_python on Apache on Win2k?

Rolfe rolfedh at hotmail.com
Fri Sep 26 16:28:09 EDT 2003


In response to Peter Maas <fpetermaas at netscape.net>:

Thank you. I have rechecked my config (shown below) - but I still
can't get the script (also shown below) to run in mod_python. I've
tried it in both the /cgi-bin/, and in /htdocs/test/:

THE CONFIG FILE READS AS FOLLOWS:

# MOD_PYTHON STUFF (added by
Rolfe)--------------------------------ROLFE
LoadModule python_module modules/mod_python.so

<Directory "C:/Program Files/Apache Group/Apache2/cgi-bin/"> 
	AddHandler python-program .py
	PythonHandler mod_python.publisher
	PythonHandler mptest
	PythonHandler form
	PythonDebug On
</Directory>

<Directory "C:/Program Files/Apache Group/Apache2/htdocs/test/"> 
	AddHandler python-program .py
	PythonHandler mod_python.publisher
	PythonHandler mptest
	PythonHandler form
	PythonDebug On
</Directory>

THE FULL SCRIPT READS AS FOLLOWS:

from mod_python import apache

def handler(req):
    req.write("Hello World!")
    return apache.OK

Adding:
#! c:/python22/python.exe to the top of the script brings up a
DOWNLOAD FILE dialog. In that dialog, if I select RUN, the script
executes quickly in a DOS-like command line window and then exits.

Any suggestions?




More information about the Python-list mailing list