[mod_python] SuSE 7.1 RPM mod_python & apache

Linscombe, Jason LinscombeJ at cmalliance.org
Thu May 24 12:20:23 EST 2001


I tried to simplify things and took it out of the <IfDefine PYTHON> tags and
placed the LoadModule and AddModule lines in the normal place (along with
all the others.  But I'm getting the same error as before.  Does the
<Directory /some/directory/htdocs/test> need to be placed inside another set
of tags or can it simply be appended at the end of the file?  I have it as
the last 5 lines of my httpd.conf

jason



-----Original Message-----
From: Alain Tésio
Sent: Thursday, May 24, 2001 10:54 AM


Hi, I have the same setup without "<IfDefine PYTHON>" and it works ...

Alain



----- Original Message -----
From: "Linscombe, Jason" <LinscombeJ at cmalliance.org>
To: <mod_python at modpython.org>
Sent: Thursday, May 24, 2001 5:02 PM
Subject: [mod_python] SuSE 7.1 RPM mod_python & apache


>
> Hi List,
>
> I'm trying to run mod_python over apache and could use some help setting
> this up.  Here is my setup...
>
> Apache-1.3.14-6
> Python-2.0-6
> mod_python-2.7.1-3
> Distro: SuSE 7.1 Installed the above with RPM
>
> Here is the python stuff in my httpd.conf
> -----------------------------------------------------------------
> <IfDefine PYTHON>
> LoadModule python_module /usr/lib/apache/mod_python.so
> </IfDefine>
>
> <IfDefine PYTHON>
> AddModule mod_python.c
> </IfDefine>
>
> <Directory /usr/local/httpd/htdocs/test>
>   AddHandler python-program .py
>   PythonHandler mptest
>   PythonDebug On
> </Directory>
> -----------------------------------------------------------------
>
>
> And I have this in a file called /usr/local/httpd/htdocs/test/mptest.py
> -----------------------------------------------------------------
> from mod_python import apache
>
> def handler(req):
>     req.send_http_header()
>     req.write("Hello World!")
>     return apache.OK
> -----------------------------------------------------------------
>
>
> I have checked all file permissions and everything seems to be OK.  All of
> the above was either default in my httpd.conf or what I found in the
> "Testing" page on the documentation.  The problem I'm having is with the
> above, I try to start apache and I get the following error:
>
> FAILED:  See /var/log/httpd/rcapache.log for details
>
> here is the rcapache.log file...
> -----------------------------------------------------------------
> Syntax error on line 1634 of /etc/httpd/httpd.conf
> Invalid command 'PythonHandler', perhaps mis-spelled or defined by a
module
> not included in the server configuration.
> -----------------------------------------------------------------
>
>
> Question:  is this mptest.py file necessary for running python scripts
over
> the web server or is this simply a test?  Being a python newbie, I don't
> really know what to do next.  Thanks in advance for any help!
>
> jason
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list