[mod_python] Getting mptest.py to work

Graham Dumpleton grahamd at dscpl.com.au
Wed Jan 19 06:03:44 EST 2005


On 19/01/2005, at 9:40 PM, Johann Spies wrote:

> On Wed, Jan 19, 2005 at 09:28:16PM +1100, Graham Dumpleton wrote:
>
>> If you are configuring things in the .htaccess file, you do not need 
>> the
>> <Directory> directive around the statements. Ie., use just:
>>
>>   AddHandler mod_python .py
>>   PythonHandler mptest
>>   PythonDebug On
>>
>> Start with making that change,
>
> Thanks.  I have made the change but there is no difference in
> behaviour.
>

Do a sanity check to see if the .htaccess file is actually being read.
One can use another feature of mod_python to check this. Add:

   PythonOption Name

If mod_python is working okay and the .htaccess file is being read,
this should cause a 500 server error to be returned as a value for
option hasn't been supplied.

If you don't see this, then might be that main httpd.conf file not
configured to allow .htaccess in that part of directory hierarchy,
although, not sure if that is possible.

Next step might be to use the original <Directory> directive block
you had and put it in the main httpd.conf in an appropriate spot
to see if that makes a difference.

BTW, in your content handler, use "text/plain" and not "text/html"
as it isn't actually HTML.



More information about the Mod_python mailing list