[SPAM] [mod_python] [SPAM] Problem installing on Apache 1.3.34/Win32 - "make_obcallback returned no obCallBack!"

Jim Gallacher jpg at jgassociates.ca
Tue May 30 09:34:07 EDT 2006


Sanja Bougakov wrote:
> Hello,
> 
> I've attempted to install mod_python on Apache 1.3.34 running on Windows 
> XP Home.
> 
> I've downloaded and installed python-2.4.3.msi (with all default 
> settings), extracted mod_python.dll from python2.2-apache1.3.22.zip to 
> python's installation directory.
> 
> I've added the following to my httpd.conf:
> 
>  LoadModule   python_module "c:/python24/mod_python.dll"
>  AddHandler python-program .py
>  PythonHandler mptest
>  PythonDebug on
>  AddType text/html .py
> 
> Then I've copied python24.dll to python22.dll (leaping ahead: I've also 
> tried installing Python-2.2.3.exe to get 'genuine' 2.2 DLL, but it 
> didn't change anything). Apache starts OK telling:
> 
>  Apache/1.3.34 (Win32) mod_python/2.7.6 Python/2.2.3 PHP/4.4.2 running...
> 
> But when I try opening "Hello World" test file from my browser, I get 
> Error 500 and the following line in VirtualHost's error.log:
> 
>  [Sun May 28 16:17:39 2006] [error] [client 127.0.0.1] python_handler: 
> make_obcallback returned no obCallBack!
> 
> Main error.log contains:
> 
>  'import site' failed; use -v for traceback
>  make_obcallback(): could not import mod_python.apache.
>  make_obcallback(): could not call init.
> 
> How can I fix it and make it work?
> 
> Thanks in advance,
> Sanja

Generally the make_obcallback results when the apache module is not able 
to find the mod_python python modules. Things can get muddled when you 
have several python versions on your system.

Setting the PYTHONHOME environment variable to the correct python may 
help. Make sure the user running apache has the correct permissions to 
access the python modules.

That being said, I really don't think it's a good idea to be copying the 
dlls for different versions around. It may work, but I would not be 
surprised if you ran into problems later.

Jim





More information about the Mod_python mailing list