M
Manuel Pellecer
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, path)
ImportError: No module named mptest
Please some help!!!
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, path)
ImportError: No module named mptest
Please some help!!!