Cannot import mod_python modules
Steve Holden
steve at holdenweb.com
Tue Apr 12 08:58:41 EDT 2005
Mark wrote:
> Hi, I've just installed the Win32 build of mod_python 3.1.4 for Python
> 2.4 and have setup my Apache config file with the LoadModule and
> PythonHandler directives and then copied "mod_python.so" to my Apache
> modules directory.
>
> I restarted Apache and decided to do a quick cgi.test() and it shows
> that mod_python listed under server software section.
>
> OK, next I tried mptest.py, but I get an Internal Server Error. The
> traceback recorded in the error log says "No module named _apache"
>
> mptest.py:
>
> from mod_python import apache
>
> def handler(req):
> req.write("Hello World!")
> return apache.OK
>
> Why doesn't this work? or rather what have I missed?
Usually this is a permissions issue, often because you installed
mod_python as a non-administrator.
regards
Steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
More information about the Python-list
mailing list