|
Mário Gamito
lists at tuxdoit.com
Sun Mar 6 15:04:25 EST 2005
Hi,
I've installed mod_python in Apache, *carefully* following the
instructions in the site:
"$ ./configure --with-apxs=/usr/local/apache/bin/apxs
make
make install"
After that, i've configured (and restarted) Apache:
"LoadModule python_module libexec/mod_python.so
(...)
<Directory /var/www/html>
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
</Directory>"
wrote the example in the tutorial:
"from mod_python import apache
def handler(req):
req.write("Hello World!")
return apache.OK"
and put it in /var/www/html in a file named mptest.py
--
Now, the problems :(
Apache won't start if i have the lines:
"PythonHandler mptest
PythonDebug On"
It says:
"Invalid Command PythonHandler, perhaps mis-spelled or defined by a
module not included in the server configuration"
"Invalid Command PythonDebug, perhaps mis-spelled or defined by a module
not included in the server configuration".
If i comment those lines, Apache starts but mod_python doesn't parse the
code, it just displays it in the browser :(
If i use a .htaccess file in /var/www/html, same thing happens.
I've read the FAQ, googled for the problem, but did not found any
suggestion that solved this issue.
I'm using Apache 1.3.33, mod_python 2.7.11 and Python 2.3.4
I'm stuck on this :(
Any help would be apreciated.
Warm Regards,
Mário Gamito
|