Graham Dumpleton
grahamd at dscpl.com.au
Tue Feb 15 18:50:35 EST 2005
If you really want to use Python 2.4, you are going to have to somehow force a reference to the Python library in mod_python.so. Since you aren't using a framework install, not sure what the library is you have to force link with. You might want to look for Python related libraries in such directories as: /usr/local/lib /usr/local/lib/python2.4/config BTW, is there anything you really want in Python 2.4? Especially if you are a UNIX novice, trying to host two different versions of Python on MacOSX can be a problem. I guess at least you didn't use a framework install and do it on top of the system supplied version of Python. Doing that can really screw things up bad. The only catch on using standard MacOSX Python installation is that you need to patch src/mod_python.c file in source to workaround a problem with it. Use of "worker" may also trigger some other mod_python bugs. Fixes for both are detailed in: http://www.dscpl.com.au/projects/vampire/PATCHES Graham John Raines wrote .. > My website had been stable and running without error but I'd been > running on 2.3.3, 2.0.52 and 3.1.3; since everything was behind the > times I decided to finally reinstall; I made the mistake of doing it on > the drive that everything was being served off of instead of using my > backup drive. :-( > > I installed python 2.4 and it seems to work when I call it from the > shell. I did not do a frameworkInstall, which seems to be recommended > by some people. I am too much of a unix novice to understand what the > implications of frameworkInstall are. I installed apache and mod_python > as follows: > > cd ~/Desktop/httpd-2.0.53 > ./configure --enable-so --with-mpm=worker > make > sudo make install > > cd ~/Desktop/mod_python-3.1.4 > ./configure --with apxs=/usr/local/apache2/bin/apxs > --with-python=/usr/local/bin/python2.4 > make > sudo make install > > I restored my old httpd.conf file and my website files. My index.html > file is straight html which links to .py files. As soon as I try to > access any of the .py stuff I now get an internal server error message > and the server log shows this: > > [Tue Feb 15 16:25:25 2005] [notice] mod_python: Creating 32 session > mutexes based on 6 max processes and 25 max threads. > [Tue Feb 15 16:25:25 2005] [notice] Apache configured -- resuming > normal operations > [Tue Feb 15 16:25:36 2005] [error] make_obcallback: could not import > mod_python.apache.\n > Traceback (most recent call last): > File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", > line 22, in ? > import time > ImportError: Failure linking new module: : dyld: > /usr/local/apache2/bin/httpd Undefined symbols: > /usr/local/lib/python2.4/lib-dynload/time.so undefined reference to > _PyArg_Parse expected to be defined in the executable > /usr/local/lib/python2.4/lib-dynload/time.so undefined reference to > _PyArg_ParseTuple expected to be defined in the executable > /usr/local/lib/python2.4/lib-dynload/time.so undefined reference to > _PyDict_GetItemString expected to be defined in the executable > /usr/local/lib/python2.4/lib-dynload/time.so un > <--what > happened here?? > [Tue Feb 15 16:25:36 2005] [error] make_obcallback: could not import > mod_python.apache. > > for what its worth I can access various parts of the time module when I > run Python2.4 from the shell. > > Going back through the the mailing list I saw that Graham Dumpleton > (back on Dec 23) suggested the output from this might be useful; what I > get is different from what he saw but I'm not sure what to make of my > result: > > jraines-Computer:~/Desktop/Website jrraines$ otool otool -L > /usr/local/apache2/modules/mod_python.so > otool: can't open file: otool (No such file or directory) > /usr/local/apache2/modules/mod_python.so: > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, > current version 71.1.1) > > jraines-Computer:~/Desktop/Website jrraines$ ls > /usr/local/apache2/modules > httpd.exp mod_python.so > > My problem seemed like it might be similar to a thread titled Weird > ob_callback problems at the end of Jan. I tried the suggestions Grisha > made:Try defining DYLD_FORCE_FLAT_NAMESPACE=1 environment variable > before launching httpd. > That didn't help either. > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python
|