[mod_python] Newbie Question from a newbie - mod_python/Apache 1.3 accessing Python 2.4 libraries

Deron Meranda deron.meranda at gmail.com
Thu Apr 27 12:28:34 EDT 2006

On 4/27/06, Christian Rougeau <crougeau at dining.umd.edu> wrote:
> If we install mod_python onto our apache 1.3 server running on RHEL4, can I
> also access regular Python 2.4's libraries that are also installed on the
> OS?

That depend's on what version of Python was used to "compile"
the mod_python module.  If Python 2.4 compiled your mod_python,
then yes, your mod_python handlers have full access to the
Python 2.4 libraries.

> Am I to use a certain handler in order to do this, or does handlers matter ,
> in this situation?

No, it depends on which Python executable you use when you
build/install mod_python.  It can't be changed, short of recompiling.

> Also, I assume I can use my mod_perl right along side my mod_python AND Cold
> Fusion, with no problems / interferences…………RIGHT?

It's hard to answer that question.  In general, yes, different modules
will safely co-exist.  But that can fail in practice, usually because two
of the Apache modules themselves have dependencies on some
additional library which is in common.  MySQL is a common case.
It could be that your Perl interface to MySQL uses a particular
MySQL library version (and hence mod_perl is dependent upon
it), but your Python interface to MySQL uses a different version,
and hence your mod_python modules would too.  Although it's
usually PHP which shows up most often as an offender.
Deron Meranda

More information about the Mod_python mailing list