[mod_python] mod_python 2.5 error on fresh install

Gregory Trubetskoy grisha at modpython.org
Mon Oct 9 15:55:47 EST 2000


There is a bug in the documentation. Either put the directives below in an
.htaccess file, or wrap them inside <Directory> tags, like this

<Directory /full/path/to/mptest.py>
  SetHandler blah blah....
</Directory>

--
  Gregory (Grisha) Trubetskoy
       grisha at modpython.org

On Mon, 9 Oct 2000, Hamilton Link wrote:

> I sent this to comp.lang.python as well... I'd go the RPM route or the
> DSO route but if someone can point me in the right direction I'd just as
> soon use the latest version of mod_python (i.e. 2.5). Is there some
> problem with the installation file in the (rather limited) online docs?
> 
> thanks,
> hamilton
> 
> 
> > I should probably add that I have the following in my httpd.conf, and that the
> > mptest.py file is in $APACHEDIR/htdocs/test -- I wouldn't be overly surprised if
> > this is a configuration problem, I'm just not sure what to do to fix it (I'm trying
> > a few things though). How am I supposed to tell it where to look for python files
> > with such handlers? Am I just supposed to put them in the python directory structure
> > -- that doesn't seem right either...
> >
> >  AddHandler python-program .py
> >  PythonHandler mptest
> >  PythonDebug On
> >
> > I'm trying to set up mod_python in Apache. I've built Apache before
> and
> > everything works fine, but this time I included mod_python amongst the
> 
> > statically linked mods (I figured I'd try that and then go back and
> try
> > the seemingly more complicated process of building mod_python as a
> DSO,
> > just to compare). Apache still works fine, except for mod_python.
> > I RTFM'ed and did what the instructions from modpython.org said,
> > modified my httpd.conf etc. but when I try to actually reference a .py
> 
> > file I get the following instead:
> >
> > Mod_python error: "PythonHandler mptest"
> >
> > Traceback (innermost last):
> >
> >   File "/usr/lib/python1.5/site-packages/mod_python/apache.py", line
> > 135, in Dispatch
> >     module = import_module(module_name, req)
> >
> >   File "/usr/lib/python1.5/site-packages/mod_python/apache.py", line
> > 276, in import_module
> >     module = __import__(module_name)
> >
> > ImportError: No module named mptest
> >
> > I'm new to python, so I'm not crazy about debugging apache.py -- has
> > anyone had this problem or does anyone know what I f...ed up?
> >
> > thanks,
> > hamilton
> 
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 




More information about the Mod_python mailing list