Jim Gallacher
jpg at jgassociates.ca
Sun Apr 9 18:32:41 EDT 2006
cyberco wrote: > On my system: > > ============= > mod_python 3.2.8 > apache 2.0.55 > python2.4 > winxp > ============= > > When I try to load a .py file I get the error: > ============== > [Sun Apr 09 14:03:46 2006] [error] make_obcallback: could not import > mod_python.apache.\n > [Sun Apr 09 14:03:46 2006] [error] python_handler: no interpreter callback > found. > [Sun Apr 09 14:03:46 2006] [error] [client 192.168.2.100] python_handler: > Can't get/create interpreter., referer: > http://myserver/test/ > ============== > > Jim Gallacher offered: > ============== > This may happen when you have several different python versions installed on > your > system, and mod_python is trying to use the wrong one. If this is the > case, adjust the path that apache sees so that the correct python > appears first in the path. > ============== > > But..... > - I only have one version of Python installed > - From the Python interpreter I can import the mod_python module just fine > - At starup the Apache log states: > [Sun Apr 09 22:16:38 2006] [notice] Apache/2.0.55 (Win32) mod_python/3.2.5b > Python/2.4.2 configured -- resuming normal operations > [Sun Apr 09 22:16:38 2006] [notice] mod_python: Creating 8 session mutexes > based on 0 max processes and 250 max threads. > > I added the following to my httpd.conf: > ============== > LoadModule python_module modules/mod_python.so > <Directory "C:\Program Files\Apache Group\Apache2\htdocs\test"> > AddHandler mod_python .py > PythonHandler mptest > PythonDebug On > </Directory> > ============== > > where mptest.py contains: > ============== > from mod_python import _apache > def handler(req): > req.content_type = 'text/plain' > req.write("Hello World!") > return apache.OK > ============== > > I'm at a loss here. Any suggestions? > It may just be a typo in your message, and even if not it may not be significant, but I notice that you say you are using mod_python 3.2.8 but the apache log is showing version 3.2.5b. It might be worth investigating. Jim
|