[mod_python] How to make mod_python (Win32) not to rely on registry key?

John Keyes john.keyes at secantus.com
Mon Jun 26 18:51:56 EDT 2006


Sanja,

Try setting the PYTHON_HOME environment variable:
   set PYTHON_HOME=c:/Python24

-John K

Graham Dumpleton wrote:
> sanja at bougakov.com wrote ..
>> Hello, Graham,
>>
>> The problem is that adding the
>>
>>    PythonPath "sys.path +
>> ['C:/Python24/Lib','C:/Python24/Lib/mod_python','C:/Python24/DLLs','C:/Python24/Lib/lib-tk']"
>>
>> line in httpd.conf doesn't help - I still get the
>>
>>   [Mon Jun 26 15:56:04 2006] [error] [client 127.0.0.1] python_handler:
>>   make_obcallback returned no obCallBack!
>>
>> in Apache's error.log file. But when I restore the
>> HKCU\Software\Python\PythonCore\2.4\PythonPath Registry hive and restart
>> Apache, everything works OK.
> 
> I don't know what happens on Win32, but on UNIX mod_python gets
> installed in a 'site-packages' directory and the 'site-packages'
> directory only would be in sys.path, and not the mod_python package
> directory.
> 
> Where is the mod_python package installed?
> 
> Does the user which Apache runs as have permission to read the stuff in
> the mod_python package directory?
> 
> Can people who know Win32 better than I help out at this point.
> 
> Graham
> 
>>> The SetEnv directive only affects environment variables inherited by
>>> CGI scripts. It does not affect the environment of Apache itself and
>>> thus does not affect the environment of mod_python. In order to add
>>> extra directories into the Python module search path, use the
>>> PythonPath directive as documented in the mod_python documentation.
>>> Graham
>>> On 23/06/2006, at 8:00 PM, sanja at bougakov.com wrote:
>>>> The problem is that mod_python doesn't look at these env.
>>>> variables. It checks only HKCU\Software\Python registry hive.
>>>> If I remove it and restart Apache, I get "error 500".
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
> 


More information about the Mod_python mailing list