[mod_python] installing on apache 1.x server

Graham Dumpleton grahamd at dscpl.com.au
Wed Apr 6 17:25:06 EDT 2005


On 07/04/2005, at 4:45 AM, David Bear wrote:

> The last time I tried to work with mod_python the install package (a
> freebsd port) told me I needed NON-Threading python. since I used zope
> this was not an option (unless I installed a separate python)
>
> I am wondering if that is still the case. I am using apache 1.3.x. and
> have python 2.4.x installed.
>
> If it still is required to have non-threading python, are they any
> recommendations on how to setup up both pythons on the same system,
> and have mod-python find the 'right' one?

The issue with threading on FreeBSD is that the POSIX thread library
functions reside in libc_r and not libc. When Apache is built, it only
links with libc and thus the thread functions aren't available normally.

You would either have to rebuild Apache and have it link with -lc_r
or follow advice given in FAQ entry:

   http://www.modpython.org/FAQ/faqw.py?req=show&file=faq02.011.htp

If you don't have any ability to rebuild Apache or change the 
environment
in which it starts because you are using an ISP who doesn't give you
that access, then you have a problem.

Overall, if you can solve this problem, there should be no issue with
using a thread enabled version of Python, you would just need to be very
careful if you actually wanted to use threads in your Python code and
make sure you don't call back into Apache from a thread because Apache
itself will not be thread safe.

Graham



More information about the Mod_python mailing list