Dave Britton
dave at davebritton.com
Tue Mar 22 09:05:52 EST 2005
When I am logged in under su as root I can start python and import mod_python. (import * fails of course on _apache): ======== [Tue Mar 22 14:00:38 2005] [info] Server built: Mar 16 2005 19:13:58 [Tue Mar 22 14:00:38 2005] [debug] prefork.c(956): AcceptMutex: sysvsem (default: sysvsem) [Tue Mar 22 14:01:52 2005] [error] make_obcallback: could not import mod_python.apache.\n [root at ap1 apache2]# python Python 2.3.3 (#1, May 18 2004, 02:14:01) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mod_python >>> from mod_python import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.3/site-packages/mod_python/apache.py", line 28, in ? import _apache ImportError: No module named _apache ========== I have tried many different configurations for mod_python and none of them have worked so far. The one I currently have which fails is the very simple: <Directory /usr/local/apache2/htdocs> AddHandler mod_python .py PythonHandler mptest PythonDebug On </Directory> Is there some special flag for mod_python's configure? Thanks for helping! -Dave ----- Original Message ----- From: "Nicolas Lehuen" <nicolas.lehuen at gmail.com> To: "Dave Britton" <dave at davebritton.com> Cc: <mod_python at modpython.org> Sent: Tuesday, March 22, 2005 8:23 AM Subject: Re: [mod_python] apache2 won't load mod_python > Hi, > > mod_python is loaded all right, but it cannot find the mod_python > module. If you login under the same account Apache is running under, > can you also import mod_python ? Could you give us your httpd.conf > lines related to the mod_python configuration ? > > Regards, > Nicolas > > > On Tue, 22 Mar 2005 08:05:49 -0500, Dave Britton <dave at davebritton.com> > wrote: >> I have built apache 2.053 and mod_python 3.1.4 and apache serves pages >> ok, >> and python will import mod_python, so both exist in the right places, but >> I >> get this error message, on attempting to access the simple mptest.py >> example: >> ======== >> [Tue Mar 22 13:38:42 2005] [notice] SIGHUP received. Attempting to >> restart >> [Tue Mar 22 13:38:42 2005] [notice] mod_python: Creating 25 session >> mutexes >> based on 25 max processes and 0 max threads. >> [Tue Mar 22 13:38:42 2005] [notice] Apache/2.0.53 (Unix) mod_python/3.1.4 >> Python/2.3.3 configured -- resuming normal operations >> [Tue Mar 22 13:38:42 2005] [info] Server built: Mar 16 2005 19:13:58 >> [Tue Mar 22 13:38:42 2005] [debug] prefork.c(956): AcceptMutex: sysvsem >> (default: sysvsem) >> [Tue Mar 22 13:39:17 2005] [error] make_obcallback: could not import >> mod_python.apache.\n >> [root at ap1 apache2]# >> ======== >> apache was built with the configure --enable-so option, to allow DSO >> imports. >> >> I've been struggling with this for a couple of days, and I am clueless. >> I'd >> appreciate any help! >> Thanks! >> -Dave >> >> _______________________________________________ >> Mod_python mailing list >> Mod_python at modpython.org >> http://mailman.modpython.org/mailman/listinfo/mod_python >> >
|