Graham Dumpleton
grahamd at dscpl.com.au
Thu Jun 29 01:41:35 EDT 2006
Wouter van Marle wrote .. > > > > For example: > > > 72.30.252.145 - - [25/Jun/2006:18:19:35 +0800] "GET /show_page.py/main > > > HTTP/1.0" 500 538 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp; > > > http://help.yahoo.com/help/us/ysearch/slurp)" > > > > > > This is an invalid URL, but instead of a 404 it gives a 500 error. > As > > > it's asking for a .py file, it's passed on to the python interpreter. > No > > > info in the logs - neither from Python, neither from Apache that it's > > > restarting. > > > > Nothing in "error_log" file at all???? > > Sorry didn't look there. This is the relevant part of the error_log of > this error: > > [Sun Jun 25 18:19:35 2006] [error] [client 72.30.252.145] PythonHandler > mod_python.publisher: Traceback (most recent call last): > [Sun Jun 25 18:19:35 2006] [error] [client 72.30.252.145] PythonHandler > mod_python.publisher: File > "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in > HandlerDispatch\n result = object(req) > [Sun Jun 25 18:19:35 2006] [error] [client 72.30.252.145] PythonHandler > mod_python.publisher: File > "/usr/lib/python2.3/site-packages/mod_python/publisher.py", line 98, in > handler\n path=[path]) > [Sun Jun 25 18:19:35 2006] [error] [client 72.30.252.145] PythonHandler > mod_python.publisher: File > "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 454, in > import_module\n f, p, d = imp.find_module(parts[i], path) > [Sun Jun 25 18:19:35 2006] [error] [client 72.30.252.145] PythonHandler > mod_python.publisher: ImportError: No module named show_page This is normal for mod_python 3.1.3. Ie., instead of 404 NOT_FOUND it returns 500 instead. In mod_python 3.2.8, it should return 404 NOT FOUND as one would expect. > > What handler are you using? Is this when using mod_python.publisher > > or some custom handler? > > mod_python.publisher; no custom handlers. > > > Is this with mod_python 3.2.8? In publisher > > prior to 3.2.8, if the function returned None it would cause a 500 error > > but not log anything, but current publisher would log a message in > > the error log. > > It's mod_python 3.1.3 (Debian Sarge). Doesn't seem to have a later > version available. Only choice would be to compile source for mod_python 3.2.8 from scratch then. > I used to have the problem that in some cases my function would return > None (resulting in the Error 500); that I think is solved now. I haven't > found any error-500's recently that I can directly link back to my own > programming. Graham
|