setting up mod_python handlers on a server?

Gerard Flanagan grflanagan at yahoo.co.uk
Tue Apr 11 10:38:37 EDT 2006


John Salerno wrote:
> I get this internal error message when I try to access a PSP page:
>
> "Invalid command 'PythonHandler', perhaps mis-spelled or defined by a
> module not included in the server configuration"
>
> So it seems that mod_python is not fully configured yet to handled PSP
> pages. When I check the installed Apache handlers, there is an entry
> called "mod_python .psp" where the first term is the handler and the
> second is the extension. I also tried adding "PythonHandler" as it
> appears in the htaccess file, but nothing is working. Sometimes the HTML
> is displayed, and other times I get a 500 Internal Server Error page.
>
> I had assumed when a server has mod_python installed, you can start
> using PSP functionality automatically, but I guess there's more work to
> do to set it up. Can anyone tell me what else I might need to do? Add
> another handler, perhaps?
>
> Thanks.

I'm just learning apache and mod_python myself so no expertise, but do
you have an 'AddHandler' or a 'SetHandler' before 'PythonHandler'?

I have this:

SetHandler mod_python
PythonPath "sys.path"
PythonHandler mod_python.publisher
PythonDebug On

and I think what you want is:

AddHandler mod_python .psp
PythonHandler mod_python.psp

Gerard




More information about the Python-list mailing list