mod_python + apache + winxp => nogo

C

cyberco

And I thought this would be trivial...getting mod_python to run within
apache on windows XP.

=============
mod_python 3.2.8
apache 2.0.55
python2.4
winxp
=============

After adding:
"LoadModule python_module modules/mod_python.so"

to apache's httpd.conf, apache refuses to start, saying:
"cannot load c:/<path>/mod_python.so into server: the specified module
could not be found"

'mod_python.so' is in the modules folder under apache, though.

I've searched everywhere, but could not find a solution. Anybody here
that has been successful in getting this combo to work?
 
R

Rune Strand

I've set up that combo several times. I haven't had any problems. I
just looked at apach.conf, it's the same line. Did you run the
mod_python-3.2.8.win32-py2.4.exe installer?
 
J

Jim Gallacher

cyberco said:
And I thought this would be trivial...getting mod_python to run within
apache on windows XP.

=============
mod_python 3.2.8
apache 2.0.55
python2.4
winxp
=============

After adding:
"LoadModule python_module modules/mod_python.so"

to apache's httpd.conf, apache refuses to start, saying:
"cannot load c:/<path>/mod_python.so into server: the specified module
could not be found"

'mod_python.so' is in the modules folder under apache, though.

I've searched everywhere, but could not find a solution. Anybody here
that has been successful in getting this combo to work?

Surely not *everywhere*, since a similar question was posed on the
mod_python mailing list just 3 days ago. ;)

For possible solutions see:
http://modpython.org/pipermail/mod_python/2006-April/020770.html

Jim
 
F

Fuzzyman

cyberco said:
And I thought this would be trivial...getting mod_python to run within
apache on windows XP.

=============
mod_python 3.2.8
apache 2.0.55
python2.4
winxp
=============

After adding:
"LoadModule python_module modules/mod_python.so"

I'm no expert - having never tried that combination (but I have heard
of it and you should try the mod_python mailing list).

However, if IIRC then a '.so' file is a UNIX type library file.
(Possibly the equivalent of a dll on windows). This sounds awry to me.

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
 
J

Jim Gallacher

Fuzzyman said:
I'm no expert - having never tried that combination (but I have heard
of it and you should try the mod_python mailing list).

However, if IIRC then a '.so' file is a UNIX type library file.
(Possibly the equivalent of a dll on windows). This sounds awry to me.

It's an apache thing. Apache loadable modules have the same suffix on
all platforms, so mod_python.so is correct.

Jim
 
D

Damjan

to apache's httpd.conf, apache refuses to start, saying:
"cannot load c:/<path>/mod_python.so into server: the specified module
could not be found"

which probably means that mod_python.so is not in that directory?
 
C

cyberco

Thanks Jim, I indeed did not look in the mailinglist archive (you have
to subscribe for that and Google didn't cache it yet).

The problem was indeed the missing .DLL's. After adding them to my
'PATH' variable apache was at least able to start. Unfortunately things
still don't work. 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/
==============

This seems more like a bug in mod_python. Any suggestions?
 
J

Jim Gallacher

cyberco said:
Thanks Jim, I indeed did not look in the mailinglist archive (you have
to subscribe for that and Google didn't cache it yet).

The problem was indeed the missing .DLL's. After adding them to my
'PATH' variable apache was at least able to start. Unfortunately things
still don't work. 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/
==============

You are halfway there. Apache has found the mod_python loadable module,
but now *it* can't find the correct mod_python lib files. 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.
This seems more like a bug in mod_python.

Not a bug - unless you consider poor documentation a bug ;). Your
configuration is still not correct.

Any suggestions?

I'm not sure if our Windows guy reads c.l.p. on a regular basis and I'm
rather clueless about Windows issues. Subscribe to the mod_python
mailing list. You can always unsubscribe later. :).

Jim
 
C

cyberco

Hi Jim,

Thanks, I'll sign up for the mailinglist, but to finish the story here:

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

Cheers,
cyberco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top