[mod_python] Problem Running mod_python with apache Apache/2.0.63

Simon Bierbaum bierbaum at vierfalt.com
Wed Aug 20 18:07:53 EDT 2008


>>>       PythonHandler mptest
>>> [...]
>>> /home/augusto/www/trac/test.py


Shouldn't the file be named mptest.py?

Am 20.08.2008 um 23:52 schrieb hh at dsgx.org:

> Ya i went there but still same problem from what i think is loading  
> issue of mod_python.so so insted of using it . it just dumps the  
> text into the screen
> :(
>
> Graham Dumpleton escreveu:
>> Try starting over, including removing:
>>
>>   AddHandler python-program .py
>>
>> at global scope in configuration and follow instructions and  
>> debugging tips in:
>>
>>   http://www.dscpl.com.au/wiki/ModPython/Articles/ 
>> GettingModPythonWorking
>>
>> Graham
>>
>> 2008/8/21 hh at dsgx.org <hh at dsgx.org>:
>>
>>> I installed mod_python using freebsd 6.x thru ports
>>> /usr/ports/www/mod_python3
>>> mod_python module was installed in
>>> --
>>> -rwxr-xr-x  1 root  wheel  121971 Aug 20 02:18
>>> /usr/local/libexec/apache2/mod_python.so
>>> --
>>> Added the line into my httpd.conf
>>> LoadModule python_module /usr/local/libexec/apache2/mod_python.so
>>> PythonOption mod_python.mutex_directory "/tmp"
>>> AddIcon /icons/p.gif .pl .py
>>> AddHandler python-program .py
>>>
>>> and tried to do that hello world test
>>> ----
>>> settup a directory entry like on tutorial
>>> --
>>> <Directory /home/augusto/www/trac>
>>>       AddHandler mod_python .py
>>>       PythonHandler mptest
>>>       PythonDebug On
>>> </Directory>
>>> ----
>>> -rwxr-xr-x  1 wwwrun  wwwrun  216 Aug 20 01:31
>>> /home/augusto/www/trac/test.py
>>> --
>>> inside ->
>>> from mod_python import apache
>>>
>>>   def handler(req):
>>>           req.content_type = 'text/plain'
>>>                   req.write("Hello World!")
>>>                           return apache.OK
>>> ----
>>>
>>> the error_log from my apache to make sure that the mod_python  
>>> module was
>>> loaded
>>> ->
>>> Wed Aug 20 13:15:25 2008] [notice] Apache/2.0.63 (Unix)  
>>> mod_python/3.3.1
>>> Python/2.5.2 PHP/4.4.9 configured -- resuming normal operations
>>> ---
>>>
>>>
>>> Everything seems to be normal but insted of reading the file it  
>>> just dumps
>>> the text to my browser any ideias ??? Thanks alot.
>>>
>>>
>>> _______________________________________________
>>> Mod_python mailing list
>>> Mod_python at modpython.org
>>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>>
>>>
>>
>>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list