[mod_python] Re: [mod python] Fwd: mod python configuration problem

Alexandre F. Santos ochipepe at gmx.net
Sat Jul 16 11:29:18 EDT 2005


Hello,

I finally got the admin to do some of the stuff Graham suggested to try to
find what is not working in mod_python (always gives error 500 while trying
to access a .py file):

1 - Checking that mod_python is running:

> .... To know for sure that the Apache DSO module for
> mod_python has been installed, you need to sight the startup line in
> Apache log file for it. Ie., something like:
> 
>    [Tue Feb 01 16:08:21 2005] [notice] Apache/2.0.51 (Unix)
>      mod_python/3.1.3 Python/2.3 configured -- resuming normal operations

Searching through his logs, the admin only found "-- resuming normal
operations" at startup but no mention of mod_python. He mentions that this
could be due to the fact that he wrote

ServerTokens Prod
ServerSignature Off

in the general Apache configuration.

So basically it's not proven that mod_python is running... Is there any way
of checking it without restarting the server?

2 - Checking that the Apache conf allows defining handlers in a .htaccess
file:

>    ... the main Apache configuration may not 
> be enabled
>    so as to allow you to specify Apache handlers in a ".htaccess" file. 
> To enable
>    this facility, edit your main Apache configuration file and add in an
>    appropriate location:
> 
>      <Directory /some/directory>
>      AllowOverride FileInfo
>      </Directory>
> 
> but it may be possible that the lack of the AllowOverride for FileInfo 
> could
> also perhaps result in an internal server error response. If this is 
> the case,
> accessing "hello.txt" should yield the error as well and you'll need to 
> get
> the AllowOverride option enabled for your directory.

I could access hello.txt without any problems

As for the AllowOverride FileInfo, the admin says that's ok, and the folders
containing the user accessible space even have AllowOverride All

3 - log error message while accessing a .py file:


> Unfortunately this leaves a horrid set of possibilities where even what 
> is in
> the Apache error log may not help. This is because for certain 500 
> errors
> internal to mod_python when trying to initially process your request, it
> either doesn't log anything at all, or logs it to stderr but doesn't 
> flush
> it properly meaning that it doesn't appear in the Apache logs until 
> Apache is
> next shutdown/restarted. Both these cases have been dealt with for the 
> next
> version of mod_python, but you are going to have to contend with them.

The admin tells me that accessing a .py file (causing a 500 error) does not
issue a python related error message.

I guess from here on the next step is to find a way to check that mod_python
is working. I hope there's a way to do that without asking the admin to
restart apache (he's been very cooperative, but I think that's rather
abusive).

Thanks for the help,

Alex

-- 
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f�r Mail, Message, More +++


More information about the Mod_python mailing list