[mod_python] 500 internal server error

chase3 at llnl.gov chase at oldben.llnl.gov
Fri Dec 9 13:36:55 EST 2005


As a first step in moving a CGI script to mod_python, I wrapped the
script in a handler.  This seems to work and the database does 
receive the data.   It looks like things should be ok.  However,
I am getting a 500 Internal Server Error back that I have not been
able to figure out, as there were no other clues in the error_log.  
In fact, putting an log message shows execution is successful:

  ...
    # Close the connection
    db.close()
    apache.log_error ( "success", apache.APLOG_ERR )
    return apache.OK
  else:
    apache.log_error ( "Failed!", apache.APLOG_ERR )
    return apache.SERVER_RETURN

I get "success" in the log file.

I put this mod_python script in the cgi-bin because when it was 
in htdocs, I ran into 401 Authorization Required problems.
I should mention that I am not communicating to the server with
a URL in a browser, but through a utility that uses CURL and SSL to
do an HTTPS post, so user authentication is not possible.
When the mod_python script is in cgi-bin, user authentication is 
not required. The software uses a digital signature for authentication.

<Directory "/etc/httpd/cgi-bin/tracker">
    AddHandler python-program .py
    PythonHandler mod_python.publisher
    PythonDebug On
</Directory>

Any ideas on how to locate the server error?

Apache server is at 2.0.46; python 2.2.35 and mod_python-3.0.3-3.ent

Thanks,
Lila
 

-- 
Lila Chase
lchase at llnl.gov



More information about the Mod_python mailing list