[mod_python] Question about mod_python configuration

Graham Dumpleton grahamd at dscpl.com.au
Sat Jan 20 18:03:01 EST 2007


On 21/01/2007, at 5:39 AM, export at hope.cz wrote:

> Jim,
> Thank you for your reply.
>
> I  added the PythonPath, so that the configuration looks  like this
>
> <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/ 
> htdocs/test">
>     PythonPath "sys.path +  ['C:/MyDirectory/projects/mimproject/ 
> apps/mimi/ModPythonPom/views/mod']"
>     AddHandler mod_python .py
>     PythonHandler mptest
>     PythonDebug On
> </Directory>
>
> but it still does not  work when I try to run mptest handler in mod  
> directory.
> Where can be a problem?

The problem is that you never quite give enough information for us to  
really
know what the issue may be and so we can only make wild guesses based
on past experience of what people do wrong.

Please do the following:

1. Give the exact location of where the mptest.py now is. Does the user
that Apache runs as have permission to search that location and read
the handler file?

2. Give the URL that you are now using and expect to match to that  
handler.
Are you still wanting to access it as '/test/....' or expecting it to  
be available
as something else?

3. Give what error message the browser is giving back or otherwise  
indicate
what sort of error you are getting that makes you believe it isn't  
working.

4. Look in the Apache error log and give whatever error messages appear
there which relates to the failed request.

If you can give this information our guesses may be better. :-)

Graham

> Thank you for help
> Lad
>
>
>
> > export at hope.cz wrote:
> > > I am able to use mod_python with this configuration
> > >
> > > <Directory "C:/Program Files/Apache Software Foundation/ 
> Apache2.2/htdocs/test">
> > >         AddHandler mod_python .py
> > >        PythonHandler mptest
> > >       PythonDebug On
> > >   </Directory>
> > >
> > > where server root is
> > >  "C:/Program Files/Apache Software Foundation/Apache2.2"
> > >
> > >
> > > But now I would like to  move PythonHandler  ( here mptest) to  
> a different place.
> > > I need  the PythonHandler to  be in
> > >
> > > C:/MyDirectory/projects/mimproject/apps/mimi/ModPythonPom/views/ 
> mod
> > >
> > > How must change the above configuration so that I can use  
> mod_python?
> >
> > The easiest way is to use the PythonPath directive to include your
> > handler in the search path. See
> > http://www.modpython.org/live/current/doc-html/dir-other-pp.html
> >
> > So use something like:
> >
> > <Directory "C:/Program Files/Apache Software
> > Foundation/Apache2.2/htdocs/test">
> >    PythonPath "sys.path +
> > ['C:/MyDirectory/projects/mimproject/apps/mimi/ModPythonPom/views/ 
> mod']"
> >    AddHandler mod_python .py
> >    PythonHandler mptest
> >    PythonDebug On
> > </Directory>
> >
> > Note that the PythonPath statement above should be on one line.  
> There
> > might be line wrapping issues with this message.
> >
> > Jim
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070121/3cca6495/attachment.html


More information about the Mod_python mailing list