Why is Mac OS X 10.6 using /usr/lib to start Apache when I compiled PHP using /opt/local/lib?

Posted by Anthony on Super User See other posts from Super User or by Anthony
Published on 2011-01-18T16:35:06Z Indexed on 2011/11/20 9:59 UTC
Read the original article Hit count: 362

Filed under:
|
|

PHP 5.3.3 compiled on Mac OS X 10.6 - using /usr/lib when trying to start Apache... rather than /opt/local/lib specified when PHP was configured.

Why is it trying to load from /usr/lib when I specified in my configure not to?

httpd: Syntax error on line 115 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: /opt/local/lib/libiconv.2.dylib\n Referenced from: /usr/libexec/apache2/libphp5.so\n Reason: Incompatible library version: libphp5.so requires version 8.0.0 or later, but libiconv.2.dylib provides version 7.0.0

The error message above refers to /opt/local/lib which when I run:

otool -LD /opt/local/lib/libiconv.2.dylib 

Message:

/opt/local/lib/libiconv.2.dylib: /opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)

It shows that the version is different than what httpd is erring out as.

I have a feeling I need to recompile Apache using newer libraries, but the error message still doesn't make too much sense to me.

© Super User or respective owner

Related posts about mac

Related posts about php