[mod_python] Status of Mac OS X / Apache 1.3 / mod_python 2.7.10.

Graham Dumpleton grahamd at dscpl.com.au
Sat Jul 31 19:13:26 EDT 2004


I wanted to get mod_python working with the standard version of Apache 
(1.3) that
comes with Mac OS 10.3 but before I even tried I noted a number of 
posts in various
places on the net asking how to get it to work since they weren't even 
able to
get it to compile or if they did, the apache process died when 
mod_python was
loaded. In my search, I couldn't find anyone indicating that they had 
solved the
problem. The only positive indication was someone making available a 
prebuilt
version of mod_python but this was for Mac OS 10.1 and it has since 
been removed
from the net.

Actually trying it myself, I fixed the obvious problems with the 
makefiles and build
process but also found that the apache process died. Digging further, I 
found the
underlying problem was that Py_IsInitialized() always returned true, 
even on the
first time it was called from the python_init() function in 
mod_python.c. As such,
the required call to Py_Initialize() never occurred, nor did setup for 
threading.
Because initialisation of the interpreter never occurred, Python 
subsequently died
the first time a Python function was actually called. Adding a separate 
initialisation
flag in python_init() fixed the problem and so far on a simple example 
it is working
okay.

That said, what is the official status of mod_python 2.7.10 on Mac OS X 
with the
version of Apache (1.3) that comes with the OS?

Can post instructions/patch later if there is the interest.


--
Graham Dumpleton (grahamd at dscpl.com.au)



More information about the Mod_python mailing list