[mod_python] Authentication and Publisher Handler

Graham Dumpleton grahamd at dscpl.com.au
Sun May 29 01:13:56 EDT 2005


On 29/05/2005, at 8:45 AM, Ales Zemene wrote:

> hi,
> i am reffering to :
> http://www.modpython.org/live/mod_python-2.7.8/doc-html/tut-more- 
> complicated.html
> after all i get Internal Server Error.
> actually is it completely the same if i put
> AddHandler python-program .py
> PythonHandler myscript
> PythonAuthenHandler myscript
> in apaches httpd.conf or .htaccess ?

Include:

   PythonDebug On

in the Apache configuration.

With this you might then see actual Python error message in browser.  
You should
be able to see it now in the Apache error log if there actually is one  
being
produced.

Post the actual code you used for the handlers if you still can't see  
what the
problem is. An internal server error is generally a coding error, or  
not returning
appropriate response from handler for way being used. Can also be a  
configuration
problem sometimes.

> and
>
> http://www.modpython.org/live/mod_python-2.7.8/doc-html/tut-pub.html
> there are 3 files : config, html file and form.py
> i created it, but when i submit the html form, :
> The requested URL /mptesting/form/email was not found on this server

What exactly did you call each of the files and are they in the same  
directory?

One reason for not found errors is where "MultiViews" is not turned  
"Off" and
you use just "form/email" instead of "form.py/email". When MultiView is  
on
Apache tries to be smart about determining the extension of the file to  
apply
request to and it can get confused with the way mod_python does things.  
It
can especially be a problem if you had "form.html" and "form.py".

Thus, try "form.py/email" instead of just "form/email". Also look in  
the Apache
error log file as at least with Apache 2.0 (not sure about 1.3), it  
will say
when it is applying content negotiation whereby it guesses correct  
extension
and that will give you a clue that that is the problem.

Graham



More information about the Mod_python mailing list