No subject

Christian Justo cjusto at neopolitan.com
Fri Aug 10 17:58:06 EDT 2007


Hi,
I'm simply trying to get mod_python working on my apache 
server but when I create a .py file the output returned 
from the browser is the code in the file and not just the 
output from the script. I have read the manual and tried 
mptest.py with an .htaccess file both in /var/www/html/ 
and still no luck. When I browse to mptest.py with Firefox 
I get the mptest.py code:

from mod_python import apache

def handler(req):
     req.content_type = 'text/plain'
     req.write("Hello World!")
     return apache.OK


This is the .htaccess file:

AddHandler mod_python .py
PythonHandler mptest
PythonDebug On

This is part of httpd.conf:
LoadModule python_module modules/mod_python.so

mod_python version:3.3.1-3
OS:Linux Fedora 7
Python version:2.5 (r25:51908, Apr 10 2007, 10:29:13)[GCC 
4.1.2 20070403 (Red Hat 4.1.2-8)]
Apache version:Apache/2.2.4 (Fedora)

I have a copy of my mod_python test page with more 
information if it's needed. Any help would be greatly 
appreciated, thank you much for your time.



More information about the Python-list mailing list