setting up mod_python handlers on a server?

J

John Salerno

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.
 
G

Gerard Flanagan

John said:
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
 
J

John Salerno

Gerard said:
and I think what you want is:

AddHandler mod_python .psp
PythonHandler mod_python.psp

This is what I have in my htaccess file (along with debugging). But
there is also an option in the control panel to set new handlers and
extensions on the server, but I'm not sure what to call them, so I've
been trying several combinations, like:

mod_python .psp #this wasn't there yesterday, but is now
PythonHandler .psp
mod_python.psp .psp

You get the idea. I'm not sure if I'm even on the right track by trying
to add new handlers though.
 
D

Daniel Nogradi

and I think what you want is:
This is what I have in my htaccess file (along with debugging). But
there is also an option in the control panel to set new handlers and
extensions on the server, but I'm not sure what to call them, so I've
been trying several combinations, like:

mod_python .psp #this wasn't there yesterday, but is now
PythonHandler .psp
mod_python.psp .psp

You get the idea. I'm not sure if I'm even on the right track by trying
to add new handlers though.

Chances are that you will get much more help on the mod_python mailing
list which is at http://modpython.org/ and please send all your apache
directives referring to mod_python that way it should be easier to see
where the problem is.
 
J

John Salerno

Daniel said:
Chances are that you will get much more help on the mod_python mailing
list which is at http://modpython.org/ and please send all your apache
directives referring to mod_python that way it should be easier to see
where the problem is.
Thanks, I will try that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top