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

Jorey Bump list at joreybump.com
Thu Apr 27 12:21:59 EDT 2006

Christian Rougeau 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?

mod_python isn't python. It uses whatever python you have installed on 
your system (hopefully you have only one). So the answer is yes.

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

It's all about handlers. Use the ones that come with mod_python, get one 
from a third party, or write your own. You must use a handler, some 
people use more than a few, depending on the need.

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

If incompatible libraries were used, apache could crash. For example, 
mod_python doesn't have builtin MySQL support. You need to install a 
python module like MySQLdb, most likely compiling it against your 
system's mysql libraries. However, other apps like PHP and possibly 
ColdFusion may have been compiled against a different mysql version. If 
  apps in these different languages attempt to use mysql, apache may 
crash. This also applies to some other things, like expat. It's hard to 
debug when it happens, and it also makes rolling your own difficult on 
some platforms. Be warned.

A tip: Don't use apache 1.3 because it limits you to an obsolete version 
of mod_python. I still run some production servers with this setup, but 
as a newbie, you will benefit greatly from the newest versions of 
mod_python that will only run on apache 2.x.x. Does RHEL4 provide more 
recent versions?

More information about the Mod_python mailing list