[mod_python] leopard - no interpret

Graham Dumpleton graham.dumpleton at gmail.com
Sat Jan 12 01:29:47 EST 2008


On 12/01/2008, dudley ackerman <rdacker at pacbell.net> wrote:
>
> On Jan 11, 2008, at 9:58 PM, Graham Dumpleton wrote:
>
> > On 12/01/2008, dudley ackerman <rdacker at pacbell.net> wrote:
> >>
> >> On Jan 11, 2008, at 9:36 PM, Graham Dumpleton wrote:
> >>
> >>> Have you tried a basic mod_python handler first rather than trying
> >>> to
> >>> get publisher working? See:
> >>>
> >>> http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking
> >>>
> >>> for suggested path to at least getting basic handler working first.
> >>>
> >>> Graham
> >>
> >> yes - i get the same behavior -- a text dump of the file
> >>  - unless i end the url with a slash - then i get 'not found'.
> >
> > Have you followed all the suggestions in that document in regard to
> > validating that mod_python is loaded by checking the Apache error
> > logs? Have you tried the .htaccess method described in that document?
> >
> > Have you independently from that document tried setting up
> > mod_python.testhandler as described in mod_python documentation to
> > also confirm that the server you are talking to actually has
> > mod_python loaded?
> >
> > Just work through that document step by step and when something
> > doesn't do what the document says should happen and you have tried all
> > the suggestions in that document, then come back and say exactly where
> > in the procedure in that document you got up to and explain what you
> > tried in order to debug it.
> >
> > Graham
>
> before i begin the beguine, could anyone possibly mention if this
> symptom has every been seen?

Yes.

> and if so, is there a known cause for it?

Incorrect Apache configuration. Apache doesn't appear to know that it
should be treating the file with .py as special and routing it through
mod_python.

> and if so, is there a known cure?

Fix the configuration.

If the answer was more obvious then I would have said so. All we can
do is get you to follow a known series of steps to try and get
something working, otherwise we would need psychic powers to know what
is wrong.

Graham

> >>> On 12/01/2008, dudley ackerman <rdacker at pacbell.net> wrote:
> >>>> text is dumped to web page instead of being interpreted.
> >>>>
> >>>> using apple python and apache2 on leopard macbook pro:
> >>>> mod_python/3.3.1 Python/2.5.1 configured
> >>>> i built mod_python with -arch i386 and -arch x86-64 in the
> >>>> mod_python
> >>>> src/makefile - no problem.
> >>>>
> >>>> in httpd.conf i have:
> >>>> <Directory "/Library/Webserver/Documents">
> >>>>    AddHandler mod_python .py
> >>>>    PythonHandler mod_python.publisher
> >>>>    PythonDebug On
> >>>> </Directory>
> >>>>
> >>>>
> >>>> my test script has:
> >>>> from mod_python import apache
> >>>>
> >>>> def hello(req):
> >>>>  req.content_type = "text/plain"
> >>>>  req.write("Hollow Earth")
> >>>>  return
> >>>>
> >>>> actually, when i try localhost/mptest.py/hello, i get 'file not
> >>>> found' -
> >>>> going to localhost/mptest.py gives me the text dump of the file.
> >>>>
> >>>> any suggestions?
> >>>> _______________________________________________
> >>>> Mod_python mailing list
> >>>> Mod_python at modpython.org
> >>>> http://mailman.modpython.org/mailman/listinfo/mod_python
> >>>>
> >>
> >>
>
>


More information about the Mod_python mailing list