[mod_python] invalid command pythonhandler

Gianni - Infodata gianni at infodataweb.com
Thu Feb 23 06:44:05 EST 2006


Hi,

I have followed all indications to install python module for apache on the
web page :
(http://www.modpython.org/live/mod_python-2.7.8/doc-html/app-wininst.html)
but when I start the server, this are the error lines :

"Syntax error on line 670 of c:/program files/apache
group/apache/conf/httpd:
Invalid command 'PythonHandler', perhaps mis-spelled or defined by a module
included in the server configuration
Note the errors or messages above, and press the <ESC> key to exit.  20..."

Somebody have already met this problem ?

Precisions :
----------------------------------------------------------------------------

The line which doesn't work in httpd.conf :
It's the line "PythonHandler mptest" which redirect to "mptest.py".
This file is in my "C:/Program Files/Apache Group/Apache/htdocs/python" .
this file must print "Hello World"  in my browser.

   <Directory "C:/Program Files/Apache Group/Apache/htdocs/python">
    AddHandler python-program .py
    PythonHandler mptest
    PythonDebug on
   </Directory>

----------------------------------------------------------------------------

Content of mptest.py :

from mod_python import apache

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

----------------------------------------------------------------------------

Configuration :

I have installed :
- Apache : apache_1.3.33-win32-x86.exe
- the python module files : mod_python-2.7.8.tgz
- The dll of python module : mp152dll.zip
- Python executable : py152.exe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060223/a4364a24/attachment.html


More information about the Mod_python mailing list