lbradley at hush.com
lbradley at hush.com
Sun Nov 21 20:26:30 EST 2004
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks for your response. I'm able to import the modules from the python interpreter invoked from the command line, and yes I can't import _apache, which is apparently normal. You asked what version of Unix I'm using. Its on a remote host where I don't have root, netcraft.com says "Linux" and I'm not sure how to find out from the command line. The host is grokthis.net, and he gives you your own apache configuration files...But there seems to be a shared version of mod_python so it looks at this point like its beyond my control, its not my fault. So I'm going to go ahead and take it up with my sysadmin. Thanks for you help! On Sun, 21 Nov 2004 13:24:32 -0800 Graham Dumpleton <grahamd at dscpl.com.au> wrote: >On Nov 21 02:00, <lbradley at hush.com> wrote: >> >> I'm trying to get mod python working on a unix host. When I set >> it up according to the instructions, I get a 500 error and the >> following in my error log: >> make_obcallback: could not import mod_python.apache >> >> On Apache 2 on my local computer (running XP) the exact same >setup >> works fine. >> The problem system is running: >> Apache/2.0.49 (Unix) mod_ssl/2.0.49 OpenSSL/0.9.7d DAV/2 >PHP/4.3.6 >> mod_python/3.1.3 Python/2.3.4 >> >> Any ideas? > >One of the reasons you will get that error is if the Python >modules for mod_python >are not actually installed, or not installed in the location where >the version of >Python used by mod_python expects them to be. > >What happens when you run Python on the command line and try and >import >mod_python? > >/usr/local/apache-2.0/logs [509]$ python >Python 2.3 (#1, Sep 13 2003, 00:49:11) >[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin >Type "help", "copyright", "credits" or "license" for more >information. >>>> import mod_python.apache >Traceback (most recent call last): > File "<stdin>", line 1, in ? >ImportError: No module named mod_python.apache >>>> > >Do you get whats above or what is below? > >/usr/local/apache-2.0/logs [510]$ python >Python 2.3 (#1, Sep 13 2003, 00:49:11) >[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin >Type "help", "copyright", "credits" or "license" for more >information. >>>> import mod_python.apache >Traceback (most recent call last): > File "<stdin>", line 1, in ? > File >"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/pytho >n2.3/site-packages/ >mod_python/apache.py", line 28, in ? > import _apache >ImportError: No module named _apache >>>> > >If you get the first error then mod_python isn't even installed >correctly for the >version of Python being used. Get the second error and it is at >least installed. >You will get the error about "_apache" as it only exists when >modules are >imported within the contect of a running Apache process under >mod_python >Apache handler. > >If you have multiple versions of Python installed, make sure you >do this with >the exact version that mod_python handler for Apache is actually >using. > >If you want further help you are going to have to say which UNIX >platform you >are on. Also, show the full error messages appearing around the >make_obcallback >error in the logs. Ie., include the mod_python extension loading >message. > >[Mon Nov 22 08:12:39 2004] [notice] mod_python: Creating 32 >session mutexes based on 6 max >processes and 25 max threads. >[Mon Nov 22 08:12:40 2004] [notice] Apache/2.0.51 (Unix) >mod_python/3.1.3 Python/2.3 configured >-- resuming normal operations >[Mon Nov 22 08:13:24 2004] [error] make_obcallback: could not >import mod_python.apache.\n > >-- >Graham Dumpleton (grahamd at dscpl.com.au) -----BEGIN PGP SIGNATURE----- Note: This signature can be verified at https://www.hushtools.com/verify Version: Hush 2.4 wkYEARECAAYFAkGhQD8ACgkQhiYrq+nRF6p6YACeP1e1MWAzUSgHbFFjYyR8vloRa7gA n1fHAF88Z+C0nYPZKxvatwJylaKX =ZYGg -----END PGP SIGNATURE----- Concerned about your privacy? Follow this link to get secure FREE email: http://www.hushmail.com/?l=2 Free, ultra-private instant messaging with Hush Messenger http://www.hushmail.com/services-messenger?l=434 Promote security and make money with the Hushmail Affiliate Program: http://www.hushmail.com/about-affiliate?l=427
|