|
Wouter van Marle
wouter at squirrel-systems.com
Sat Jul 16 08:09:57 EDT 2005
Graham,
Here the relevant details:
in httpd2.conf one line:
LoadModule python_module extramodules/mod_python.so
In 16_mod_python.conf:
<Location /python>
SetHandler python-program
PythonHandler mod_python.publisher
</Location>
After dinner I'm going to look into this more! This is the current
setup.
Wouter.
On Sat, 2005-07-16 at 21:41 +1000, Graham Dumpleton wrote:
> Have you specified:
>
> PythonHandler mod_python.publisher
>
> within a <Directory> directive or in a .htaccess file?
>
> If you haven't and you instead put it at global scope or within a
> <Location> directive, you can have such problems because PythonPath
> will not be automatically extended with the name of the directory
> for which PythonHandler is specified.
>
> Alternatively, are you setting PythonPath explicitly in any way?
> Setting PythonPath explicitly can also override the automatic addition
> of the PythonHandler directive to PythonPath and again module will
> not be able to be found.
>
> You might want to post the snippet of Apache configuration where you
> setup use of mod_python. There is no need to send the whole Apache
> configuration, just the relevant bit, ensuring though you show any
> context it is set within, such as <Location>, <Directory> when it
> is appropriate.
>
> Graham
>
> On 16/07/2005, at 9:27 PM, Wouter van Marle wrote:
>
> > Hi all,
> >
> > After an upgrade to Mandrake 10.2, mod_python shows the following
> > error:
> >
> > Mod_python error: "PythonHandler mod_python.publisher"
> >
> > Traceback (most recent call last):
> >
> > File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line
> > 299, in HandlerDispatch
> > result = object(req)
> >
> > File "/usr/lib/python2.4/site-packages/mod_python/publisher.py",
> > line 98, in handler
> > path=[path])
> >
> > 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 index
> >
> >
> > >From my address bar I can see that this is before the very first
> > page (an html page that redirects to the python based content and
> > thereby changes the url in the address bar). Any idea what's going
> > wrong here?
> >
> > The software, from rpm packages:
> > apache2-2.0.53-9mdk
> > apache2-mod_python-2.0.53_3.1.4-4mdk
> > python-base-2.4.1-2mdk
> > python-2.4.1-2mdk
> >
> > Wouter. _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
>
>
|