mod_python config problem

Manuel Pellecer mpellecer at galileo.edu
Fri Jun 3 15:16:17 EDT 2005


i want to use mod_python with Apache2 and i made a .htaccess in the 
subdirectory where i have all my scripts:

The .htacces goes like this:

AddHandler mod_python .py

PythonHandler mptest

PythonDebug On

and I changed the main configuracion file of Apache2 like this:

#--memepelle

<Directory /var/www/cgi>

        AllowOverride FileInfo

</Directory>

#memepelle--

and i made a mptest.py that goes like this:

from mod_python import apache

def handler(req):

        req.content_type = "text/plain"

        req.write("Hello World!")

        return apache.OK

But i still have this error and i don't know why

Mod_python error: "PythonHandler mptest"

Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 287, 
in HandlerDispatch
log=debug)

File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 454, 
in import_module
f, p, d = imp.find_module(parts[i], path)

ImportError: No module named mptest

Please some help!!!




More information about the Python-list mailing list