[mod_python] test doesn't work (solved?)

Miguel Marques miguel at yorku.ca
Wed Jun 21 12:27:47 EST 2000


On Wed, 21 Jun 2000 12:10:31 -0400, Miguel Marques <miguel at yorku.ca> wrote:
> On Tue, 20 Jun 2000 22:00:16 -0400 (EDT), Gregory Trubetskoy <grisha at modpython.org> wrote:
> > 
> > On Tue, 20 Jun 2000, Gregory Trubetskoy wrote:
> > 
> > > I am almost certain that this is caused by
> > > 
> > > 1. a syntax error in test.py
> > > 2. a permissions problem
> > 
> > OR
> > 
> > 3. If the PythonHandler directive is in httpd.conf outside any <Directory>
> > tags, or if PythonHandler is inside a <Directory> different from that in
> > which test.py is, then /usr/local/lib/python1.5/test/ gets imported
> > instead, which, of course, doesn't have a function called "handler".
> > 
> > HTH
> > 
> > Grisha
> > 
> Well, I have the same problem.  I've tried everything I can think of.
> This also happened with mod_python/2.2.
> My setup is 
> SunOS 5.7 Apache/1.3.12 (Unix) ApacheJServ/1.1 mod_perl/1.24 mod_python/2.4 Python/1.5.2
> 
> 1. I can run test.py with python as apache (my server run under username apache)
> 2. I think 1. rules it out and I've checked the permissions of the all
>    the python files.
> 3. my directive is 
> 
> <Directory "/usr/local/apache/htdocs/test">
>     AddHandler python-program .py
>     PythonHandler test
>     PythonDebug on
> </Directory>

If I add a slash to the end of the directory in the Directory directive it works.
<Directory "/usr/local/apache/htdocs/test/">
    AddHandler python-program .py
    PythonHandler test
    PythonDebug on
</Directory>

I couldn't get a Location directive to work either way, though.
Is there a reason for this which I don't understand?
Thanks.

						  Miguel

C. Miguel Marques, York University, Computing & Communications Services
e-mail: miguel at yorku.ca, voice: (416)736-2100x22684, fax: (416)736-5830







More information about the Mod_python mailing list