[mod_python] mod_python.publisher and mod_python.psp possible ?

Jorey Bump list at joreybump.com
Wed Sep 3 08:57:53 EDT 2008


dave selby wrote, at 09/03/2008 07:43 AM:

> I have been changing over my PHP server side scripts to mod-python
> very successfully. So far I have been using the following apache
> config ...
> 
>         AddHandler mod_python .py
>         PythonHandler mod_python.publisher
>         # Display python errors to web browser - useful for debug
>         PythonDebug On
> 
> However some of my old code uses embedded PHP inside the HTML., so I added
> 
>        AddHandler mod_python .py
>         PythonHandler mod_python.publisher
>         PythonHandler mod_python.psp
>         # Display python errors to web browser - useful for debug
>         PythonDebug On
> 
> This seems to break PythonHandler mod_python.publisher, I am guessing
> it just redefines the PythonHandler.
> Is there a way to have both mod-python running as a server side script
> & also embedded in HTML code ?

You can assign different handlers to different extensions like this:

   AddHandler mod_python .py .psp
   PythonHandler mod_python.publisher | .py
   PythonHandler mod_python.psp | .psp




More information about the Mod_python mailing list