[mod_python] make_obcallback: could not import mod_python.apache

LaPlante, James JLaPlante at challiance.org
Wed Jan 28 16:25:04 EST 2004


I'm getting the following error in the apache err_logs when I try to run the
mptest.py script:
[Wed Jan 28 14:55:14 2004] [error] make_obcallback: could not import
mod_python.apache.

My Google searches have turned up quite a few people that have gotten the
same error, but I still haven't found a fix for the problem.  Any help would
be appreciated.  My latest attempts used mod_python 3.1.3b.  I got the same
error using mod_python 3.0.4.  Here is what I've done so far.


Compiled, installed, and tested Apache 2.0.48
./configure --prefix=/usr/local/apache2
make
make install

Compiled, installed, and tested Python 2.2.3
./configure -prefix=/usr/local/python2.2.3
make
make install

Compiled and Installed DSO for Mod_Python
./configure --with-apxs=/usr/local/apache2/bin/apxs
--with-python=/usr/local/python2.2.3/bin/python2.2
make
make install


Configured httpd.conf by adding the following:
LoadModule python_module /usr/local/apache2/modules/mod_python.so

<Directory /usr/local/apache2/htdocs/test>
  AddHandler python-program .py
  PythonHandler mptest
  PythonDebug On
</Directory>

Created /usr/local/apache2/htdocs/test/mptest.py and set world execute
from mod_python import apache

def handler(req):
    req.write("Hello World!")
    return apache.OK


Apache Error Log After Startup
[Wed Jan 28 14:55:14 2004] [notice] Apache/2.0.48 (Unix) mod_python/3.1.2b
Python/2.2.3 configured -- resuming normal operations

Apache Error Log after http://servername/test/mptest.py is called
[Wed Jan 28 14:55:14 2004] [notice] Apache/2.0.48 (Unix) mod_python/3.1.2b
Python/2.2.3 configured -- resuming normal operations
[Wed Jan 28 14:55:14 2004] [error] make_obcallback: could not import
mod_python.apache.




More information about the Mod_python mailing list