[mod_python] server misconfig error

Mike Dewhirst miked at dewhirst.com.au
Thu Aug 25 02:05:38 EDT 2005

Mike Dewhirst wrote:

> Graham Dumpleton wrote:
>> It looks like you are actually using a CGI script and aren't actually
>> using mod_python at all. The two AddHandler directives for the .py
>> extension are going to be in conflict. If you comment out
>>   AddHandler mod_python .py
>>   PythonDebug On
>> does your code still work on the box where it is working on so far?
> Yes it does !!

Further to that ... not only was I labouring under that major 
misapprehension which you so gently pointed out, the reason one setup 
worked and the other didn't was the #! line at the top of the script. I 
have Python installed in different places on each machine. I decided to 
uninstall everything and start again on the failing machine but this 
time use Python 2.4 and Apache 2.0.54. As soon as I updated the #! line 
to the new python location it all started working.

I thought the the Apache error log indicating it couldn't find a file 
was referring to one of my python files.

Might remember that.

Thanks again


>> This will confirm that mod_python isn't necessary for what you are
>> doing.
> OK - what I want to do is interface KinterbasDB and Firebird and I 
> figured this might be a first (albeit parallel) step.
>> In other words, you don't need mod_python if all you want is a CGI
>> script that can be written using Python.
>> For an example of what a basic mod_python handler is actually about,
>> you might follow through the example in:
>>   http://www.dscpl.com.au/articles/modpython-001.htm
> Visiting as we speak - Thanks Graham
> Regards
> Mike

More information about the Mod_python mailing list