[mod_python] Apache 1.3.12, Python 1.6, mod_python 2.5 not playing well together

Ben Leslie benno at sesgroup.net
Fri Sep 29 10:42:34 EST 2000


On Thu, 28 Sep 2000, Jeff Okamoto wrote:

> > My httpd.conf has this in it:
> > 
> > <Directory /var/www>
> > AddHandler python-program .py
> > PythonHandler mptest
> > PythonDebug on
> > </Directory>
> 
> The relevant section for me is:
> 
> <Directory />
>     Options FollowSymLinks
>     AllowOverride None
> </Directory>
> 
> <Directory /opt/apache>
>     AddHandler python-program .py
>     PythonHandler mptest
>     PythonDebug On
> </Directory>

That seem correct to me.
 
> > The trick is that whatever is specified as the directory will get added to the
> > sys.path when trying to find the module.
> > 
> > If your apache root is somewhere else like (/home/www or something) then add that
> > instead.
 
> Sadly, it's still not working. 

Is it the same error message? What is in error.log. One thing that you 
might want to try is putting mptest.py into the same directory as apache.py,
this ensures that it is going to be in the correct path. That might help
narrow down the problem. Also you probably need to make sure that the file has
read and execute permission for the apache user.

> It's quite sad that the install.html file
> doesn't mention putting it inside a Directory directive and that there's
> in fact a syntax error in it (PythonDebug *ON*, not PythonDebug).

Yeah well shit happens, guessing it is probably case of the code gaining features
faster than the docs can keep up with (though I'm just a new user, so I am merely
guessing).

Cheers,

Benno



More information about the Mod_python mailing list