[mod_python] plz help :-)

Khalid El-Kary khalid_kary at hotmail.com
Fri Apr 11 18:05:22 EST 2003


Hi fellows,
I have sent this question before, but i got no reply, can you plz help :-)

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






_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the Mod_python mailing list