[mod_python] Newbie question

Gregory Trubetskoy grisha at modpython.org
Wed Dec 20 11:18:02 EST 2000


I would verify where your mod_python PACKAGE is and make sure that it is
in PYTHONPATH. Not the PythonPath keyword you specified below, but the
sys.path (which can be altered via the PYTHONPATH variable prior to
starting apache) at the time when you start apache.

--
  Gregory (Grisha) Trubetskoy
       grisha at modpython.org

On Wed, 20 Dec 2000, Victor Muslin wrote:

> I am running Apache 1.3.12 on WindowsNT 4.0 with Python 2.0.
> 
> Tried to configure it to use mod_python. Made the following relevant 
> changes in httpd.conf:
> DocumentRoot "g:/top/public/web/dev/htdocs"
> <Directory "g:/top/public/web/dev/htdocs">
> #
> LoadModule python_module modules/mod_python.dll
> #
> PassEnv PYTHONPATH
> 
> <Directory "g:/top/public/web/dev/htdocs/test">
>          AllowOverride All
>          AddHandler python-program .py
>          PythonHandler mptest
>          PythonDebug On
>          PythonPath 
> "['e:/apps/python20/lib','g:/top/public/web/dev/htdocs/test']"
> </Directory>
> 
> (Not sure whether PythonPath is necessary; it was not in instructions on 
> the mod_python web site, but I saw it in some news group posting. In any 
> case, the behavior is the same with or without it.)
> 
> Seems that the server loads mod_python fine, because when it comes up it 
> says: Apache 1.3.12 (Win32) mod_python/2.6.3 Python/2.0 running...
> 
> As per instructions I created mptest.py and placed it into 
> g:/top/public/web/dev/htdocs/test.
> from mod_python import apache
> 
> def handler(req):
>      req.send_http_header()
>      req.write("Hello World!")
>      return apache.OK
> 
> However, when I point my browser to it 
> (http://127.0.0.1:8000/test/mptest.py) I get an Internal Server Error. The 
> message in the error log says: [Wed Dec 20 00:45:56 2000] [error] [client 
> 209.247.38.37] python_handler: make_obcallback returned no obCallBack!
> 
> Any insight would be appreciated.
> 
> TIA
> 
> _______________________________________________________________________
> Victor Muslin 




More information about the Mod_python mailing list