[mod_python] Upgrade to mod_python 3.0.0 causes some handlers not to run.

Hunter Matthews thm at duke.edu
Sun Jan 26 17:22:49 EST 2003

On Sat, 2003-01-11 at 21:56, Hunter Matthews wrote:
> I have program (current) that successfully uses the following
> confirguration under apache 1.3.24 and mod_python 2.7.8 (redhat 7.2 or
> 7.3, basically) to have a TypeHandler, AccessHandler, and PythonHander
> run on some get requests.

This has been fixed. I'm mailing the list to let other mod_python users
know what we found.

> If I take this same configuration to httpd 2.0.40 and mod_python 3.0.0
> (redhat 8.0) the python handler runs for the /XMLRPC requests, but
> neither the TypeHandler or the AccessHandler is running for the
> /XMLRPC/$RHN requests.

The problem turned out to be that if you did NOT specify the
"SetHandler" and used PythonModuleHandler in a configuration, mod_python
would not run the handlers you implemented.

The fix is, apparently, to both upgrade to mod_python 3.0.1, and to not
use PythonModuleHandler if you're not using SetHandler.

It looks like 3.0.1 will do the right thing with no SetHandler, IF you
specify all the handlers out that you want to use. PythonHandlerModule
is apparently still broken.

Here's the relevant part of our old configuration.

> <Location ~ "/XMLRPC$">
>     PythonPath "sys.path + ['/usr/share/current']"
>     SetHandler python-program
>     PythonHandler current_apache
> </Location>
> <Location /XMLRPC/$RHN>
>     PythonPath "sys.path + ['/usr/share/current']"
>     PythonHandlerModule current_apache
> </Location>

And here's the one that a user reported success with when using
mod_python 3.0.1:

<Location ~ "/XMLRPC$">
    PythonPath "sys.path + ['/usr/share/current']"
    SetHandler python-program
    PythonHandler current_apache

<Location /XMLRPC/$RHN>
    PythonPath "sys.path + ['/usr/share/current']"
    PythonTypeHandler current_apache
    PythonAccessHandler current_apache

Hunter Matthews                          Unix / Network Administrator
Office: BioScience 145/244               Duke Univ. Biology Department
Key: F0F88438 / FFB5 34C0 B350 99A4 BB02  9779 A5DB 8B09 F0F8 8438
Never take candy from strangers. Especially on the internet.

More information about the Mod_python mailing list