[mod_python] Weird ob_callback problems

Andrew Farmer andfarm at teknovis.com
Mon Jan 31 03:51:13 EST 2005

Installing mod_python 2.7.10 on Mac OS X 10.3.7. I've upgraded Python 
to 2.4 myself (the machine came with 2.3) and installed it in 
/usr/local. I'm using the stock Apache 1.3.33.

mod_python installed without trouble -- I added -DEAPI to the CFLAGS to 
avoid the httpd warning -- but, upon trying to run any Python script, I 
get an error 500 in the browser. The error log shows the following:

> make_obcallback(): could not import mod_python.apache.
> make_obcallback(): could not call init.
> [Mon Jan 31 00:21:35 2005] [error] [client] python_handler: 
> make_obcallback returned no obCallBack!

I inserted a PyErr_Print() into make_obcallback at the critical point 
and got:

> Traceback (most recent call last):
>   File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", 
> line 49, in ?
>     import time
> ImportError: Failure linking new module: : dyld: /usr/sbin/httpd 
> Undefined symbols:
> /usr/local/lib/python2.4/lib-dynload/time.so undefined reference to 
> _PyArg_Parse expected to be defined in the executable
> /usr/local/lib/python2.4/lib-dynload/time.so undefined reference to 
> PyArg_ParseTuple expected to be defined in the executable
> /usr/local/lib/python2.4/lib-dynload/time.so undefined reference to 
> PyDict_GetItemString expected to be defined in the executable
> /usr/local/lib/python2.4/lib-dynload/time.so undefined refer...

which suggests some sort of Python version mismatch. However, 
mod_python.so *looks* like it was built against Python 2.4, and the 
compilation process suggests the same.

Anyone know what's going on -- and, more importantly, what to do about 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20050131/3c559f90/PGP.bin

More information about the Mod_python mailing list