John Cartwright
John.C.Cartwright at noaa.gov
Fri Jun 16 17:39:52 EDT 2006
Hi Karl, I'm having precisely the same problems in the same environment, but have not found an answer. Please keep me posted if you sort it out and I'll do likewise. -- john Karl Kobata wrote: > > ------------------------------------------------------------------------ > > *From:* Karl Kobata [mailto:karl.kobata at syncira.com] > *Sent:* Tuesday, February 28, 2006 3:00 PM > *To:* 'mod_python at modpython.org' > *Subject:* Newbie - problem running mptest.py > > I am new to mod_python. > > This DSO module was included in Redhat RHEL 3, but I do not seem to be > able to get this working with the simple example test program. See > questions below. > > Redhat Linux RHEL 3 > > Apache 2.0.46 > > Mod_python 3.0.3 > > RHEL 3 configuration: > > /etc/httpd/conf/httpd.conf > > - in this file it includes external configuration files > > - For mod_python, it httpd.conf includes /etc/httpd/conf.d/python.conf > > - In python.conf, these directives were added: > > LoadModule python_module modules/mod_python.so > > <Directory /<DocumentRoot path>/Python> > > AddHandler python-program .py > > PythonHandler mptest > > PythonDebug On > > </Directory> > > Example file: > > Mptest.py > > from mod_python import apache > > def handler(req): > > req.write("Hello World!") > > return apache.OK > > URL reference: > > http://localhost/Python/mptest.py > > Results: > > 1) the content of mptest.py was displayed, and not executed. > > 2) Error message in error.log for apache > > [Tue Feb 28 14:24:35 2006] [error] make_obcallback: could not import > mod_python.apache.! > > Could not find platform independent libraries <prefix> > > Could not find platform dependent libraries <exec_prefix> > > Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] > > 'import site' failed; use -v for traceback > > 'import site' failed; use -v for traceback > > ImportError: No module named mod_python.apache > > Question: > > 1) what did I do wrong? > > 2) How to you use –v for traceback > > 3) Any other suggestion > > ------------------------------------------------------------------------ > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|