469,609 Members | 1,160 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

mod_python config problem

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!!!

Jul 19 '05 #1
1 1263
Getting mod_python to work is hard because there are many things to get
into account.
Your Apache version should match the proper mod_python version, as well
as the python version amd so on...
If you are having many problems, I suggest installing Apache2Triad,
which is a package that will install everything you need (and more) all
at once.

www.apache2triad.net

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by John Dean | last post: by
2 posts views Thread by Dan Gottlieb | last post: by
2 posts views Thread by digidalmation | last post: by
reply views Thread by Julien Cigar | last post: by
4 posts views Thread by Python_it | last post: by
reply views Thread by Manuzhai | last post: by
4 posts views Thread by Gaurav Agarwal | last post: by
1 post views Thread by lukasz.f24 | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.