[mod_python] can't start mod_python

Gregory Trubetskoy grisha at modpython.org
Wed Aug 2 15:22:23 EST 2000


Which user does apache run as and what are the permissions on the
mod_python directory and everything in it?

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

On Wed, 2 Aug 2000, Boh Heong Yap wrote:

> hi, 
> 
> I wonder if someone could help. I've been playing with the configuration
> of mod_python for the last few days without success. I managed to compile
> in mod_pyton statically into in Apache 1.3.12, got it restarted and tested it.
> 
>     config details at end...
> 
> When I run ~/bin/httpd -l, mod-python.c is displayed.
> 
> 
> >From the browser, "http://222.64.245.xx/pytest.py", gives the message:-
> 
>     Internal Server Error
> 
>     The server encountered an internal error or misconfiguration and was     
>     unable to complete your request.
> 
> Other normal web request seem to work fine. 
> This is what the error logs show...
> 
>     [Wed Aug  2 20:58:57 2000] [notice] caught SIGTERM, shutting down
>     [Wed Aug  2 20:59:02 2000] [notice] Apache/1.3.12 (Unix) configured
> -- resuming
>         normal operations
>     'import site' failed; use -v for traceback
>     make_obcallback(): could not import mod_python.apache.
>     make_obcallback(): could not call init.
>     [Wed Aug  2 20:59:45 2000] [error] [client 202.77.245.126] python_handler:
>         make_obcallback returned no obCallBack!
> 
> 
> The mod_python module sits in 
> 
>         /usr/local/lib/python1.5/mod_python
> 
>     (along with other .pc. .pyc modules)
> 
> 
> In my httpd.conf (everything is there, no srm.conf, access.conf), I have 
> 
>     AddHandler python-program .py
>     PythonHandler pytest.py
>     PythonDebug on
>     PythonPath "sys.path+['/usr/local/lib/python1.5/mod_python']
> 
> this is within the <Directory..> directives for ~/apache/htdocs.
> pytest.py is same as the "Hello World" example in the tutorial in
> mod_python...
> 
> 
> Also when in the Python interpreter, I try to load stuff manually, 
> ie:
> 
>     >>> from mod_python import apache
>     Traceback (innermost last):
>     File "<stdin>", line 1, in ?
>     File "/usr/local/lib/python1.5/mod_python/apache.py", line 18, in ?
>         import _apache
>     ImportError: No module named _apache
>     >>>
> 
> and apache.py does indeed have the line "import _apache"
> 
> Loading other standard python modules like "sys" works OK, hence I think
> PYTHONPATH seems OK.
> 
> 
> config_info
> ------------------
> Apache - 1.3.12
> Python 1.5, compiled from source, standard
>     (both are installed in /usr/local)
> system Linux Mandrake 7.0, 2.2.12 kernel 
> Compaq box, P3.
> 
> 
> Any help from anyone will be appreciated.
> 
> Hope I can get this working. Would love to use Python for a few things here.
> 
> 
> 
> ----------------------------------------------------------
> Boh-heong Yap
> Project Manager, eCommerce
> 				bohheong at asiacontent.com				
> 
> Asiacontent.com a leading pan-Asian Internet company,
> with focus on: content, advertising and e-commerce.
> -----------------------------------------------------------
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 




More information about the Mod_python mailing list