[mod_python] mod_python on win32

Jonas Meyer Rasmussen meyer at diku.dk
Fri May 25 02:36:14 EST 2001


Hi.
I am having alot of trouble getting mod_python to work...
(win32, Win2k Pro, Python 2.1)
apache just denies to load the module in, giving me this error:

Syntax error on line 206 of c:/progra..../httpd.conf:
Cannot load c:/.../apache/modules/mod_python.dll into server: (126) The
specified module could not be found:


I have done this:
added this to httpd.conf:

#placed after other uncommented LoadModules from std config file
LoadModule python_module modules/mod_python.dll


#placed in ifmodule mod_alias.c section
    <Directory "C:/Apache/cgi-bin">
        AddHandler python-program .py
        PythonHandler mptest
        PythonDebug on
    </Directory>



mod_python.dll is in the right place


made a small file in my apache/cgi-bin dir named mptest
which contains the following:

from mod_python import apache

def handler(req):
    req.content_type = "text/plain"
    req.send_http_header()
    req.write("Hello World!")
    return apache.OK


Jonas Meyer Rasmussen




More information about the Mod_python mailing list