View Single Post
  #3   (View Single Post)  
Old 18th October 2008
IIMarckus IIMarckus is offline
Port Guard
 
Join Date: Aug 2008
Posts: 13
Default

Thanks a lot for the detailed response!


Now I’m having problems while attempting to integrate Python with Apache. I downloaded mod_python-2.7.11 and ran DSO # ./configure --with-apxs=/usr/sbin/apxs (after creating a hardlink from python to python2.5), then make and make install, all with no problem.

After that I added "LoadModule python_module /usr/lib/apache/modules/mod_python.so" to httpd.conf and restarted Apache, or tried to.

Code:
# apachectl configtest
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_cond_signal'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_attr_destroy'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_create'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_attr_init'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_detach'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_attr_setstacksize'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_cond_init'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_mutex_unlock'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_self'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_mutex_destroy'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_mutex_lock'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_cond_wait'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_cond_destroy'
/usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_mutex_init'
Syntax error on line 215 of /var/www/conf/httpd.conf:
Cannot load /usr/lib/apache/modules/mod_python.so into server: Cannot load specified object
Looking again at the documentation reveals that this version of mod_python is meant for Python 2.1 and earlier. However, this is the newest version compatible with Apache 1.x on their web site.

What alternatives are there for using Python with Apache?

Last edited by IIMarckus; 18th October 2008 at 04:48 AM.
Reply With Quote