0

To cut a long story short, I was trying to compile and get ImageMagick working on my Mac running Snow Leopard.

One thing led to another and now I am stuck with the following error message when I try to start Apache, which I have tried unsuccessfully to fix for the last two days:

httpd: Syntax error on line 116 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/libphp5.so into server: dlopen(/usr/libexec/apache2/libphp5.so, 10): Library not loaded: /usr/local/lib/libjpeg.8.dylib\n Referenced from: /usr/libexec/apache2/libphp5.so\n Reason: Incompatible library version: libphp5.so requires version 13.0.0 or later, but libjpeg.8.dylib provides version 9.0.0

My Apache Version is as follows:

Server version: Apache/2.2.21 (Unix) Server built: Dec 5 2011 20:56:38

Output of my Apache error log is as follows:

[Tue Jan 15 20:46:36 2013] [notice] Digest: done [Tue Jan 15 20:46:36 2013] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.2.5 configured -- resuming normal operations [Tue Jan 15 20:46:41 2013] [notice] child pid 34820 exit signal Segmentation fault (11)

Any point in the right direction would be much appreciated.

migrated from stackoverflow.com Jan 15 '13 at 15:21

This question came from our site for professional and enthusiast programmers.

0

Somehow posting the issue to StackOverflow got me thinking on a different track and enabled me to fix it. It turns out when I was building PHP it wasn't generating the libphp5.so file. Here's how I solved that:

  1. First find the apxs path by typing this:

    which apxs 
    
  2. Then build PHP like so (replace /usr/sbin/apxs with the result from which apxs in step #1:

    ./configure --with-apxs2=/usr/sbin/apxs
    
    make
    
    sudo make install
    

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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