[mod_python] mod_python + apache + winxp => could not import mod_python.apache

cyberco cyberco at media2b.net
Sun Apr 9 17:55:22 EDT 2006


  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?

Thanks!
Berco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060409/417a492e/attachment.html


More information about the Mod_python mailing list