Karl Kobata
karl.kobata at syncira.com
Tue Jun 20 23:45:34 EDT 2006
Hi John, In rhel3 the scripts executed are effectively the same. The only difference is that in /sbin/service fixes the path to a default. In my case: PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" Our users path declaration includes these, and more. Also: /sbin/service calls /etc/init.d/httpd which eventually called the binary at /usr/sbin/httpd. In my case, if I compare the two files, there is no difference. diff /etc/rc.d/init.d/httpd /etc/init.d/httpd I hope this help. I agree with others that there my be a conflict in multiple versions of python installed on your system. Thanks karl -----Original Message----- From: John Cartwright [mailto:John.C.Cartwright at noaa.gov] Sent: Friday, June 16, 2006 3:30 PM To: Karl Kobata Cc: mod_python at modpython.org Subject: Re: [mod_python] Newbie - problem running mptest.py Hi Karl, I'm not sure why, but for me it makes a difference if you restart apache with: /sbin/service httpd restart vs. /etc/rc.d/init.d/httpd restart The former seems to work w/ mod_python, the latter doesn't. -- john Karl Kobata wrote: > > ------------------------------------------------------------------------ > > *From:* Karl Kobata [mailto:karl.kobata at syncira.com] > *Sent:* Wednesday, March 01, 2006 2:15 PM > *To:* 'mod_python at modpython.org' > *Subject:* FW: Newbie - problem running mptest.py > > Please help. > > thanks > > ------------------------------------------------------------------------ > > *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 >
|