problems with mod_python
dsavitsk
dsavitsk at e-coli.net
Thu May 24 20:04:28 EDT 2001
step 1.
look for this line (in httpd.conf)
<IfModule mod_alias.c>
# Lots of other stuff here
# and add this stuff
<Directory "C:/Apache/cgi-bin">
#(adjust your directory accordingly.)
AddHandler python-program .py
PythonHandler mptest
PythonDebug on
</Directory>
#before you get to this line
</IfModule>
(step 2)
also make sure that "mod_python.dll" is in "C:\...\Apache\modules\"
(step3)
and that there is a file called "mptest.py" in "C:\...\Apache\cgi-bin\", the
content of which should be as follows:
(step 4)
#----------------------------------
from mod_python import apache
def handler(req):
req.content_type = "text/plain"
req.send_http_header()
req.write("Hello World!")
return apache.OK
#----------------------------------
if this doesn't work try the mailing list.
doug
"Jonas Meyer Rasmussen" <meyer at kampsax.dtu.dk> wrote in message
news:9ek5kj$sro$1 at eising.k-net.dk...
> Hi.
> I am having alot of trouble getting mod_python to work...
> 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:
>
> All i have added to the httpd.conf file is this line:
>
> LoadModule python_module modules/mod_python.dll
>
>
> I know its kinda OT, but this was the best place i could find to ask.
>
> Jonas
>
>
More information about the Python-list
mailing list