Graham Dumpleton
grahamd at dscpl.com.au
Tue Jan 16 19:30:20 EST 2007
What version of mod_python are you using? What does the message of the form: [Tue Jan 16 21:54:16 2007] [notice] Apache/2.2.2 (Unix) mod_python/3.3.0-dev-20061203 Python/2.3.5 configured -- resuming normal operations in the error log file say? Are you see a message of the form: python_init: Python version mismatch, expected '%s', found '%s'." in the error log file? Probably will not as think this is 3.3 only. You wouldn't be able by chance be able to upgrade to mod_python 3.3.0b would you. The error reporting when these problems occur is slightly better and makes it easier to debug? You can get 3.3.0b source code from mod_python download page. One last thing to try is set: PYTHONHOME=/usr/local/lib export PYTHONHOME in the Apache init script. Change the value if it appears in error log but I haven't quite got location correct. Graham Alainna C. Wonders wrote .. > > Hi Graham, > > Sorry for the late response. Yes, I did put an export PATH after defining > the PATH. > > So in the error log I spotted some errors that look like this: > > [error] make_obcallback: could not import mod_python.apache.\n > [error] make_obcallback: Python path being used > "['/usr/lib/python23.zip', '/usr/lib/python2.3', > '/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk', > '/usr/lib/python2.3/lib-dynload', '/usr/lib/python2.3/site-packages', > '/usr/lib/python2.3/site-packages/gtk-2.0']". > > So after the PATH and export PATH lines in the init script, I put 'echo > $PATH' so it would echo the path it was using on startup. > > >/etc/init.d/httpd start > >/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin > > I'm not sure why it's still using the old version. > > - Alainna > > > > On Sat, 13 Jan 2007, Graham Dumpleton wrote: > > > > > On 13/01/2007, at 4:24 AM, Alainna C. Wonders wrote: > > > > > > > > Hi All, > > > > > > I have a Scientific Linux 4.2 server with two versions of python > > > installed > > > (2.3.4, stock; 2.4.2, my installation). > > > > > > In my apache error log, I see errors like: > > > > > > python_handler: no interpreter callback found. > > > python_handler: Can't get/create interpreter. > > > make_obcallback: could not import mod_python.apache.\n > > > ImportError: No module named mod_python.apache > > > make_obcallback: Python path being used > > > "['/usr/lib/python23.zip', '/usr/lib/python2.3', > > > '/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk', > > > '/usr/lib/python2.3/lib-dynload', '/usr/lib/python2.3/site-packages', > > > '/usr/lib/python2.3/site-packages/gtk-2.0']". > > > > > > My configure command looked like this: > > > > > > ./configure --with-apxs=/usr/sbin/apxs > > > --with-python=/usr/local/bin/python2.4 > > > > > > It ran without error, as did make/make install. > > > > > > I have also set a PATH variable in the httpd init script telling it > to > > > look in /usr/local/bin first. There is /usr/local/bin/python, > > > which is > > > set to Python 2.4.2. > > > > Did you export the PATH variable in the init script? > > > > export PATH > > > > Even though PATH is inherited into the script, local changes aren't > > exported > > from it unless an export is done explicitly. It is a strange gotcha > > of init scripts > > that has got me before. > > > > > Any recommendations? I've seen some stuff on google, and it suggested > > > setting apache's path, which I thought could be done by setting the > > > PATH > > > variable in the init script and then restarting the daemon. > > > > > > Thanks, > > > > > > Alainna > > > > > > _______________________________________________ > > > Mod_python mailing list > > > Mod_python at modpython.org > > > http://mailman.modpython.org/mailman/listinfo/mod_python > > > > -- > Alainna C. Wonders > Bloomberg Physics & Astronomy > Johns Hopkins University > Email_alainna at pha.jhu.edu > Voice_410.516.4536
|