Troy Wilson
wilsonta72 at gmail.com
Fri Nov 30 19:08:14 EST 2007
I was using 3.2.8. Have upgraded to current and it all works fine. Thanks. On Nov 28, 2007 7:51 PM, Graham Dumpleton <graham.dumpleton at gmail.com> wrote: > What version of mod_python are you using? There were bugs in that > directive which were possibly only fixed in mod_python 3.3. > > Graham > > On 28/11/2007, Troy Wilson <wilsonta72 at gmail.com> wrote: > > Hi all, > > > > I can not seem to get the PythonHandlerModule directive to work. The > > following conf works: > > ------------------------------------------------------------- > > <Directory /home/test/public_html> > > Options -Indexes -MultiViews > > <IfModule mod_python.c> > > SetHandler python-program > > PythonAuthenHandler handler > > PythonAuthzHandler handler > > PythonHandler handler > > PythonDebug On > > PythonInterpreter test > > PythonAutoReload On > > AuthType python-auth > > AuthName "Restricted" > > require valid-user > > </IfModule> > > </Directory> > > ----------------------------------------------- > > > > While this setup produces a 401 error: > > --------------------------------------------------- > > <Directory /home/test/public_html> > > Options -Indexes -MultiViews > > <IfModule mod_python.c> > > SetHandler python-program > > PythonHandlerModule handler > > PythonDebug On > > PythonInterpreter test > > PythonAutoReload On > > AuthType python-auth > > AuthName "Restricted" > > require valid-user > > </IfModule> > > </Directory> > > ------------------------------------------------ > > > > The simplest form of the handler code: > > -------------------------------------------------- > > from mod_python import apache > > > > def authenhandler(req): > > req.user = "test" > > return apache.OK > > > > def authzhandler(req): > > return apache.OK > > > > def handler(req): > > return apache.OK > > > > --------------------------------------------------------- > > > > My understanding was that the PythonHandlerModule directive would search > > inside the handler code for a function matching the phase. It does not > seem > > to do this.Have I misinterpreted what this directive was meant to > achieve? > > > > Cheers Troy > > > > _______________________________________________ > > 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/20071201/d46a8f14/attachment.html
|