Windows 2003 Server
XAMPP 1.5.5
Apache 2.2.3
mod_python 3.2.10
ActivePython-2.4.3.12-win32-x86
I read the thread: Apache won't start after inst Python add-in as well as spent several hours trying to research the issue on google, mod_python's site, apache's site, etc... I found out the XAMPP mod_perl package doesn't work w/ Apache 2, so I got the new version of mod python and active python... so here's what's happening, when my .conf file specifies the following:
- Code: Select all
LoadModule python_module modules/mod_python.so
<IfModule python_module>
<Directory "C:/Program Files/xampp/htdocs/python/">
AddHandler mod_python .py
<Files *.py>
PythonPath "['C:/Program Files/xampp/htdocs/python/'] + sys.path"
</Files>
<Files "index.py">
PythonHandler index
</Files>
<Files "xa.py">
PythonHandler xa
</Files>
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
</IfModule>
And I hit http://host/python/(xa.py|info.py), they run, all is good in the world. error log shows:
- Code: Select all
[Sat Jan 27 17:42:57 2007] [notice] mod_python: (Re)importing module 'xa'
[Sat Jan 27 17:43:22 2007] [notice] mod_python: (Re)importing module 'index'
but if I try the hello world test: mptest.py I get a 404 error and the Apache Error log shows...
- Code: Select all
[Sat Jan 27 17:43:19 2007] [notice] [client 192.168.1.103] Publisher loading page C:\\Program Files\\xampp\\htdocs\\python\\mptest.py
So I did some digging around and simplified the .conf info to:
- Code: Select all
LoadModule python_module modules/mod_python.so
<IfModule python_module>
<Directory "C:/Program Files/xampp/htdocs/python/">
SetHandler mod_python
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
</IfModule>
and suprise, everything is a 404 error. But when I look at the error logs I see
- Code: Select all
[Sat Jan 27 17:48:08 2007] [notice] mod_python: (Re)importing module 'mod_python.publisher'
[Sat Jan 27 17:48:08 2007] [notice] [client 192.168.1.103] Publisher loading page C:\\Program Files\\xampp\\htdocs\\python\\xa.py
the paths look to be correct, and when i comment out the loading of the module, the web server will return the file as if it were a txt document... but for some reason once I get python involved, everything gets messy. Has anyone dealt with this? I hope I'm not missing something glaringly obvious. Thanks!