Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using Macports on OS X 10.6 to manage Apache, PHP, and Python. I've never had any problems and the setup works great. However, when I add mod_wsgi to the mix Apache immediately crashes with a segmentation fault. Here's what's installed via macports:

  • apache2 @2.2.17_0+preforkmpm
  • php5 @5.3.3_1+apache2+pear
  • python27 @2.7.1_0
  • mod_wsgi @3.2_0+python27

After installing mod_wsgi, adding it to httpd.conf, and restarting apache, it seg faults every time. I do not have mod_python installed. If I remove mod_php by commenting it out of httpd.conf, apache runs fine. So it's clearly the mix of mod_wsgi and mod_php that's causing a crash. Any ideas on what's wrong? How can I avoid the seg fault when both are running together?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

A common cause is multiple different versions of a library being used by different modules. Use otool -L against the various dynamic libraries to see which have the conflict, then rebuild appropriately.

share|improve this answer
    
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0); /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.1); /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.42.0) Is there anything wrong here? I have no idea what it should look like. –  Matt S Dec 10 '10 at 16:02
    
Thanks! Compared the versions for libraries that the modules had in common. Found one that differed, recompiled PHP, and all is well. –  Matt S Dec 10 '10 at 16:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.