[mod_python] How do I troubleshoot a 500 Internal Server Error?

Alberto Ruiz al at ruiz.ws
Fri Mar 31 01:04:32 EST 2006


Things are looking better.  I added the 'return " "' at the end of the
function and the 500 error went away. But now I get the following:

Using Firefox browser:

userq=update user set SID='jtNoKg8ts8BKtqe01rvBuFVIuN0z80Dg' where
name='test' and password='123'<head><meta http-equiv='refresh'
content='0;url=BB.html'></head>HTTP/1.1 200 OK
Date: Fri, 31 Mar 2006 06:21:02 GMT
Server: Apache/1.3.33 (Unix) PHP/4.4.2 mod_python/2.7.11 Python/2.4.2
mod_perl/1.29
Cache-Control: no-cache="set-cookie"
Set-Cookie: sid=jtNoKg8ts8BKtqe01rvBuFVIuN0z80Dg; expires=Fri,
31-Mar-2006 16:21:02 GMT
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

1
 
0


And from MS Internet Explorer, I get a black page. Which tells me that
the <head><meta http-equiv='refresh' content='0;url=BB.html'></head>
is not working from within a script.  What am I missing to get it to
execute or is there another way to acomplish the same thing?

To complicate things a little bit more. The BB.html has just the
following:
<head><meta http-equiv='refresh' content='0;url=myscri.py/index'></head>

So I guess neither meta code is been evaluated.

On Fri, 2006-03-31 at 00:50 -0500, Graham Dumpleton wrote:
> FWIW, a bug report related to this is:
> 
>   http://issues.apache.org/jira/browse/MODPYTHON-14
> 
> It is probably not the same issue as you have no content before
> the 500 response, but all linked to the lack of a non empty non
> None return value from the published function.
> 
> Graham
> 
> Graham Dumpleton wrote ..
> > Alberto Ruiz wrote ..
> > > I'm getting a very wierd error when I call my python script.  Other
> > > Python scripts seem to work fine but one in particular returns a 500
> > > server error and the error does not show in the error-log under the
> > > virtual domain that I'm working on but on the main error-log.  How can
> > > I
> > > get additional debugging information to find out the problem?
> > > 
> > > In the error-log I get the following:
> > > mod_python: (Re)importing mod_python.publisher from None
> > 
> > In mod_python 2.7.11, this message possibly doesn't mean much.
> > 
> > > When I run my python script I get the following:
> > > 
> > > HTTP/1.1 500 Internal Server Error
> > > Date: Fri, 31 Mar 2006 04:46:55 GMT
> > > Server: Apache/1.3.33 (Unix) PHP/4.4.2 mod_python/2.7.11 Python/2.4.2
> > > mod_perl/1.29
> > > Connection: close
> > > Transfer-Encoding: chunked
> > > Content-Type: text/html; charset=iso-8859-1
> > > 
> > > 262
> > > <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> > > <HTML><HEAD>
> > > <TITLE>500 Internal Server Error</TITLE>
> > > </HEAD><BODY>
> > > <H1>Internal Server Error</H1>
> > > The server encountered an internal error or
> > > misconfiguration and was unable to complete
> > > your request.<P>
> > > Please contact the server administrator,
> > >  root at mydomain.com and inform them of the time the error occurred,
> > > and anything you might have done that may have
> > > caused the error.<P>
> > > More information about this error may be available
> > > in the server error log.<P>
> > > <HR>
> > > <ADDRESS>Apache/1.3.33 Server at mydomain.com Port 80</ADDRESS>
> > > </BODY></HTML>
> > > 
> > > 0
> > 
> > This message in mod_python 2.7.11 with no message in error log
> > generally means that your published function doesn't return anything.
> > 
> > Can you post the most minimal publisher function which shows the
> > problem?
> > 
> > Graham
> > _______________________________________________
> > 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