[mod_python] Help with Apache and mod_python

Graham Dumpleton grahamd at dscpl.com.au
Fri Dec 2 23:56:14 EST 2005


On 03/12/2005, at 12:36 AM, Paolo wrote:

> 2005/12/2, Graham Dumpleton <grahamd at dscpl.com.au>:
>> Can you get simple mod_python test handlers working at all? Ie.,
>> take Django out of the picture and use a simple example like that
>> described at:
>>
>>    http://www.dscpl.com.au/articles/modpython-001.html
>>
>> Ie.. let us ensure that your mod_python installation works first.
>
> Hi Graham, mptest.py is executed correctly (via .htaccess and global
> configuration in httpd.conf as well).
>
> Even more meaningful, I have been able to get 'with pyexpat' running
> the handler described at
> http://www.dscpl.com.au/articles/modpython-006.html#id2.

Next step then would be to import into the handler of your test code,
the module which you specify needs to be imported in order to make
use of Django. If done in the test handler function, accessing the
test URL will cause it to be imported and if it does crash at that point
you have confirmed that it is the actual import of the Django stuff that
is the problem. If that is confirmed, then look internally at Django and
see what module it imports, and instead of importing the Django top  
level
module, import what it imports. Gradually reduce the set of imports  
until
it stops crashing so as to find the specific module that causes the
problem. Drop down further into modules and look at their imports as
necessary.

This sort of process of elimination is the only way you are going to
be able to narrow it down. Unless you can determine precisely which
module is the issue, we aren't really going to be able to help.

Graham


More information about the Mod_python mailing list