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

sanja at bougakov.com sanja at bougakov.com
Fri Jun 23 06:00:40 EDT 2006


I've installed mod_python/2.7.6 and Python/2.4.3 on Apache 1.3.36 (Windows).

"Hello, World!" example works fine. My httpd.conf contains:

===cut here===
SetEnv PYTHONHOME "c:/python24/"
LoadModule python_module c:/python24/mod_python.dll

<Directory "c:/Apache_Swissknife/Websites/localhost01/html/python/">
AddHandler python-program .py
PythonHandler test
PythonDebug on
===cut here===

(note that environment variables are set using Apache's SetEnv directives).

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

I am not happy of this behaviour because I need pocket version of Apache
and mod_python on my USB drive and do not want any modifications to the
Registry. Mod_perl works this way, why mod_python doesn't? Is there any


More information about the Mod_python mailing list