[mod_python] Apache wont load/start...

Jacob Carlsson jagge_90 at hotmail.com
Thu Aug 16 06:38:58 EDT 2007


Hello!

Okey. Im going to give some more detaild information.

OS: Windows XP SP2
PYTHON: 2.4.4
MOD_PYTHON: mod_python-3.3.1.win32-py2.4-Apache2.0
APACHE: Apache 2.0.59 (yes, its from a installer i didnt compile it myself)
WHY DO I WANT MOD_PYTHON: To install the project management tool Trac

FIRST PROBLEM:
Now i had Apache 2.2, mod_python-3.3.1.win32-py2.4-Apache2.2, python 2.4 
installed.
Everytime i entered "LoadModule python_module modules/mod_python.so" my 
apache wouldnt start. There was no error specified in the apache monitor 
only said "Error", and there was no special error specified in apcahes Error 
log either, not any "couldnt find/load module" or anything.

HOW DID I SOLVE THE FIRST PROBLEM:
I really did not solve it, or maybe? First i couldnt even launch apache 
2.0.59 when adding "LoadModule ...." but then i thought, why not try 
downgrading and make clean install once more and so i did. I unistalled 
apache 2.2 and mod_python installed clean apache 2.0.59 and mod_python, 
restarted my computer and it worked. Now i could load the module without 
apache screaming about a Error. Though i directly ran into next problem but 
at least i got somewhere.
So note that BEFORE i restarted my computer i also added:

Well i simply added some paths to the PATH variable (Right click your "My 
computer" -> Properties -> Advanced -> Enviorment Variables -> find PATH i 
list -> add directorys where python is installed)

I never tried these settings with Apache 2.2 since i didnt understand that 
restarting was needed.
Also maybe this didnt solve my problem, maybe it was something else? And 
thats just exaclty the reason why im staying at 2.0.59 now when i got it 
working instead of going back to 2.2 and getting that error again.

SECOND PROBLEM:
Well, now i got apache 2.0.59, mod_python 3.3.1 read my settings on top of 
the mail for more detaild information about my system as it is now. Now i 
can run apache when LoadModule is uncommented in httpd.conf but i cant use 
python at all. When i add:

<Location /mpinfo>
   SetHandler mod_python
   PythonInterpreter main_interpreter
   PythonHandler mod_python.testhandler
</Location>

and then try to access localhost/mpinfo the server gives me a internal error 
(500).
My Apache error log says:

[Thu Aug 16 12:13:07 2007] [error] make_obcallback: could not import 
mod_python.apache.\n
[Thu Aug 16 12:13:07 2007] [error] make_obcallback: Python path being used 
"['H:\\\\install\\\\Python24\\\\python24.zip', '.\\\\DLLs', '.\\\\lib', 
'.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk', 
'H:\\\\install\\\\Apache2\\\\bin']".
[Thu Aug 16 12:13:07 2007] [error] get_interpreter: no interpreter callback 
found.
[Thu Aug 16 12:13:07 2007] [error] [client 127.0.0.1] python_handler: Can't 
get/create interpreter.

And on STARTUP of the apache it also seems to be a little error:

[Thu Aug 16 11:25:14 2007] [notice] Apache/2.0.59 (Win32) DAV/2 SVN/1.4.4 
configured -- resuming normal operations
[Thu Aug 16 11:25:14 2007] [notice] Server built: Jul 27 2006 15:55:03
[Thu Aug 16 11:25:14 2007] [notice] Parent: Created child process 520
[Thu Aug 16 11:25:14 2007] [error] python_init: Python version mismatch, 
expected '2.4.3', found '2.4.4'.
[Thu Aug 16 11:25:14 2007] [error] python_init: Python executable found 
'H:\\install\\Apache2\\bin\\Apache.exe'.
[Thu Aug 16 11:25:14 2007] [error] python_init: Python path being used 
'H:\\install\\Python24\\python24.zip;.\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk;H:\\install\\Apache2\\bin'.
[Thu Aug 16 11:25:14 2007] [notice] mod_python: Creating 8 session mutexes 
based on 0 max processes and 250 max threads.
[Thu Aug 16 11:25:14 2007] [notice] Child 520: Child process is running
[Thu Aug 16 11:25:14 2007] [notice] Child 520: Acquired the start mutex.
[Thu Aug 16 11:25:14 2007] [notice] Child 520: Starting 250 worker threads.

If anyone could help me out with my last error i would be really thankful 
since i have tried to do this for several hours now. I feel really 
disapointed and tired of just trying and trying, thats why i mail in this 
mail list.

Some other information that might be useful: (This is how i have it now, 
when apache 2.0.59 is "sort of" working:

CURRENT "PATH" VARIABLE:

........;H:\install\Python24;H:\install\Subversion\bin;H:\install\Python24\DLLs;H:\install\Python24\Lib;H:\install\Python24\Lib\lib-tk;H:\install\Python24\Lib\site-packages;H:\install\Python24\Lib\site-packages\mod_python

NOTE: Even though i have entered: Lib\site-packages\mod_python etc. It 
doesnet show this in the error log. It only shows DLLs, Lib, lib-tk, and so 
on? Why is that? I have tried restarting but this time it isnt changing? 
Maybe i must reinstall apache when these settigns are set?

CURRENT REGISTRY SETTINGS:

This is my "PythonPath" in the registry, i have tried adding 
"...site-packages\\mod_python" here as well.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Python\PythonCore\2.4\PythonPath]
@="H:\\install\\Python24\\Lib;H:\\install\\Python24\\DLLs;H:\\install\\Python24\\Lib\\lib-tk;H:\\install\\Python24\\Lib\\site-packages;H:\\install\\Python24\\Lib\\site-packages\\mod_python"


Now, if there are any more details you think i should provide then please 
let me know, i will gladly provide the information if im able to!
Im not the best on installing these actually advanced programs/modules. 
Installing Trac has been a nightmare for me. Either that wont work or that, 
trac has really succeeded in making the worlds most difficult install if you 
ask me ;).

Thank you for reading!

Best Regards Jacob Carlsson



>From: "Colin Bean" <ccbean at gmail.com>
>To: "Jacob Carlsson" <jagge_90 at hotmail.com>, list 
><mod_python at modpython.org>
>Subject: Re: [mod_python] Apache wont load/start...
>Date: Wed, 15 Aug 2007 13:35:21 -0700
>
>Try following the links from this message, they seem to address the
>same problem:
>
>http://www.modpython.org/pipermail/mod_python/2007-June/023861.html
>
>Past that I'm probably not going to be of much help as I don't use
>mod_python on windows...
>Just to clarify, you are using the installer compiled for apache
>2.0.x, correct?  I'm guessing so, as I doubt you would have gotten
>this far otherwise.
>
>Take care,
>Colin
>
>On 8/15/07, Jacob Carlsson <jagge_90 at hotmail.com> wrote:
> > Hey!
> >
> > Thank you for your fast answer!
> >
> > There was no errors in the log. Thats why it was so weird. While i 
>waited
> > for an answer i downgraded my apache to 2.0.59 again and entered my 
>python
> > installation path in the PATH variable. And when i restarted my computer 
>it
> > started up fine despite i had entered "LoadModule python_module ...". 
>But
> > still it dont work and gives me alot of errors. I'll post my log:
> >
> >
> >
> > [Wed Aug 15 21:00:47 2007] [notice] Apache/2.0.59 (Win32) DAV/2 
>SVN/1.4.4
> > configured -- resuming normal operations
> > [Wed Aug 15 21:00:47 2007] [notice] Server built: Jul 27 2006 15:55:03
> > [Wed Aug 15 21:00:47 2007] [notice] Parent: Created child process 4852
> > [Wed Aug 15 21:00:48 2007] [error] python_init: Python version mismatch,
> > expected '2.4.3', found '2.4.4'.
> > [Wed Aug 15 21:00:48 2007] [error] python_init: Python executable found
> > 'H:\\install\\Apache2\\bin\\Apache.exe'.
> > [Wed Aug 15 21:00:48 2007] [error] python_init: Python path being used
> > 
>'H:\\install\\Python24\\python24.zip;.\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk;H:\\install\\Apache2\\bin'.
> > [Wed Aug 15 21:00:48 2007] [notice] mod_python: Creating 8 session 
>mutexes
> > based on 0 max processes and 250 max threads.
> > [Wed Aug 15 21:00:48 2007] [notice] Child 4852: Child process is running
> > [Wed Aug 15 21:00:48 2007] [notice] Child 4852: Acquired the start 
>mutex.
> > [Wed Aug 15 21:00:48 2007] [notice] Child 4852: Starting 250 worker 
>threads.
> > [Wed Aug 15 21:00:51 2007] [error] make_obcallback: could not import
> > mod_python.apache.\n
> > [Wed Aug 15 21:00:51 2007] [error] make_obcallback: Python path being 
>used
> > "['H:\\\\install\\\\Python24\\\\python24.zip', '.\\\\DLLs', '.\\\\lib',
> > '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk',
> > 'H:\\\\install\\\\Apache2\\\\bin']".
> > [Wed Aug 15 21:00:51 2007] [error] get_interpreter: no interpreter 
>callback
> > found.
> > [Wed Aug 15 21:00:51 2007] [error] [client 127.0.0.1] python_handler: 
>Can't
> > get/create interpreter.
> >
> >
> > These last errors comes when i try accessing the following:
> >
> > <Location /mpinfo>
> >    SetHandler mod_python
> >    PythonInterpreter main_interpreter
> >    PythonHandler mod_python.testhandler
> > </Location>
> >
> > Like what does it mean with "Python version mismatch, expected '2.4.3',
> > found '2.4.4'.", expected 2.4.3? How could it expect something else?
> >
> > Also i tried entering some more paths into the PATH variable like
> > "Lib,lib-tk,DLLs" but it doesent seem enough...
> >
> > Best Regards Jacob Carlsson
> >
> > >From: "Colin Bean" <ccbean at gmail.com>
> > >To: "Jacob Carlsson" <jagge_90 at hotmail.com>
> > >CC: mod_python at modpython.org
> > >Subject: Re: [mod_python] Apache wont load/start...
> > >Date: Wed, 15 Aug 2007 11:08:19 -0700
> > >
> > >Please post the contents from your Apache error log when you try to
> > >start the server, can't really tell what the problem is from the
> > >information you've given.
> > >
> > >On 8/15/07, Jacob Carlsson <jagge_90 at hotmail.com> wrote:
> > > > Hello!
> > > >
> > > > Im using Windows XP.
> > > >
> > > > I have tried to get apache (both 2.2.4 and 2.0.59 to work with
> > >mod_python).
> > > > I have python 2.4 and I have tried using
> > > > "mod_python-3.2.10.win32-py2.4-apache2.2" &
> > > > "mod_python-3.3.1.win32-py2.4-Apache2.2" and also some other 
>different
> > > > versions when I tested with apache 2.0.59.
> > > >
> > > > My problem is that apache simply wont load when i enter "LoadModule
> > > > python_module modules/mod_python.so" in httpd.conf.
> > > > Now I have tried fixing this in many various ways for hours and not
> > >succeded
> > > > at all.
> > > > For example I have searched google and your page for answers and i 
>found
> > >out
> > > > that some people had the same problem as I but some of their 
>solutions
> > >didnt
> > > > work out for me.
> > > > For example I tried adding python to my "PATH" variable but that 
>didnt
> > >help
> > > > much.. Maybe i did it incorrect? I added "C:\Python24" (thats simply
> > >where I
> > > > installed python)
> > > > Also many that have the same problem didnt get an answer that i 
>could
> > >read.
> > > >
> > > > So i would appreciate any help so i finally can solve this really
> > >annoying
> > > > problem!
> > > >
> > > > Best Regards Jacob Carlsson
> > > >
> > > > _________________________________________________________________
> > > > Luspank? Tjäna pengar på auktion http://tradera.msn.se/
> > > >
> > > > _______________________________________________
> > > > Mod_python mailing list
> > > > Mod_python at modpython.org
> > > > http://mailman.modpython.org/mailman/listinfo/mod_python
> > > >
> >
> > _________________________________________________________________
> > Spela roliga Worms'07 i mobilen
> > http://msn.cellus.se/?page=game_order&itemId=878908
> >
> >

_________________________________________________________________
Luspank? Tjäna pengar på auktion http://tradera.msn.se/



More information about the Mod_python mailing list