setting up mod_python handlers on a server?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Salerno

    #1

    setting up mod_python handlers on a server?

    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 "PythonHand ler" 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.
  • Gerard Flanagan

    #2
    Re: setting up mod_python handlers on a server?


    John Salerno wrote:[color=blue]
    > 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 "PythonHand ler" 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.[/color]

    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.publ isher
    PythonDebug On

    and I think what you want is:

    AddHandler mod_python .psp
    PythonHandler mod_python.psp

    Gerard

    Comment

    • John Salerno

      #3
      Re: setting up mod_python handlers on a server?

      Gerard Flanagan wrote:
      [color=blue]
      > and I think what you want is:
      >
      > AddHandler mod_python .psp
      > PythonHandler mod_python.psp[/color]

      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.

      Comment

      • Daniel Nogradi

        #4
        Re: setting up mod_python handlers on a server?

        > > and I think what you want is:[color=blue][color=green]
        > >
        > > AddHandler mod_python .psp
        > > PythonHandler mod_python.psp[/color]
        >
        > 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.[/color]

        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.

        Comment

        • John Salerno

          #5
          Re: setting up mod_python handlers on a server?

          Daniel Nogradi wrote:[color=blue][color=green][color=darkred]
          >>> and I think what you want is:
          >>>
          >>> AddHandler mod_python .psp
          >>> PythonHandler mod_python.psp[/color]
          >> 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.[/color]
          >
          > 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.[/color]
          Thanks, I will try that.

          Comment

          Working...