Matthew Russell
matt at teaphoo.fsnet.co.uk
Tue Apr 8 23:59:30 EST 2003
"import site" error in python usually means that you havent; set yout PYTHONPATH correctly. Is is most likely that the user which starts apache on your machine has not set this in his profile. Alteritivaly use: setEnv PYTHONPATH=<my list of paths> in htttpd.conf ----- Original Message ----- From: "Khalid El-Kary" <khalid_kary at hotmail.com> To: <mod_python at modpython.org> Sent: Monday, April 07, 2003 12:55 AM Subject: [mod_python] newbie and unable to get it working > 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 > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://www.modpython.org/mailman/listinfo/mod_python >
|