Apache & Python 500 Error

Christian stonis at hotmail.com
Thu Feb 3 07:55:13 EST 2005


Jeremy Bowers schrieb:

> But first, check your apache error log. Then you will know what your error
> is, too.

Thanks for help, here is my error log:

[Thu Feb  3 13:52:49 2005] [error] PythonHandler python: Traceback (most 
recent call last):
[Thu Feb  3 13:52:49 2005] [error] PythonHandler python:   File 
"/usr/lib/python2.3/site-packages/mod_python/apache.py", line 181, in 
Dispatch\n    module = import_module(module_name, _req)
[Thu Feb  3 13:52:49 2005] [error] PythonHandler python:   File 
"/usr/lib/python2.3/site-packages/mod_python/apache.py", line 335, in 
import_module\n    module = imp.load_module(mname, f, p, d)
[Thu Feb  3 13:52:49 2005] [error] PythonHandler python:   File 
"/var/www/python/python.py", line 1
[Thu Feb  3 13:52:49 2005] [error] PythonHandler python:     from 
mod_python import apache
[Thu Feb  3 13:52:49 2005] [error] PythonHandler python:     ^
[Thu Feb  3 13:52:49 2005] [error] PythonHandler python: SyntaxError: 
invalid syntax

----
My test script:
#!/usr/bin/python

print 'Content-Type: text/plain\r'
print '\r'
import os
print os.getcwd()

thanks to Fuzzyman for test script





More information about the Python-list mailing list