[mod_python] newbie and unable to get it working

Khalid El-Kary khalid_kary at hotmail.com
Sun Apr 6 23:55:49 EST 2003


Hi fellows,
I followed the installation instructions as in the mod_python documentation 
"A Windows Installation" section ...

and added the following lines to httpd.conf:

<Directory "<Your Document Root>/python">
   AddHandler python-program .py
   PythonHandler mptest
   PythonDebug on
</Directory>

replaced "your document root" with mine :-)

and created a file called mptest.py under "my document root/python"
which contained:

from mod_python import apache

def handler(req):
   req.content_type = "text/plain"
   req.send_http_header()
   req.write("Hello World!")
   return apache.OK

Apache starts normally and writes out the mod_python headers and an error 
message with which it continues normally:

'import site' failed; use -v for traceback
Apache/1.3.24 (win32) mod_python/2.7.6 Python/2.2.1 PHP/4.2.3 running ...

unfrotunately, when i request "http://servername/python/mptest.py" it gives 
an "500 - internal server error" ...

note that mod_python and python installations with apache went just fine, 
since the headers were written properly.

Windows ME, Apache 1.3.24, mod_python 2.7.6, Python 2.2.1

anything wrong, or any suggestions to get it running ?

thanx in advance,

Regards,
Khalid Al-Kary





_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail




More information about the Mod_python mailing list