1
votes

I'm running macOS 10.12, Apache 2.4, and PHP 7.2.7

When I add the line: LoadModule php5_module libexec/apache2/libphp5.so to my httpd.conf I get the following errors.

httpd not running, trying to start

Warning: PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so (dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so, 9): Library not loaded: /usr/local/php5/lib/libcurl.4.dylib
Referenced from: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so
Reason: Incompatible library version: curl.so requires version 9.0.0 or later, but libcurl.4.dylib provides version 7.0.0), /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so.so (dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so.so, 9): image not found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so' (tried: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so (dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so, 9): Library not loaded: /usr/local/php5/lib/libcurl.4.dylib
Referenced from: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so
Reason: Incompatible library version: http.so requires version 9.0.0 or later, but libcurl.4.dylib provides version 7.0.0), /usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718//usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so.so (dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718//usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so.so, 9): image not found)) in Unknown on line 0


/usr/sbin/apachectl: line 92:   719 Segmentation fault: 11  $HTTPD "$@"

I updated curl with brew and it shows:

/usr/local/php5/lib/libcurl.4.dylib (compatibility version 9.0.0, current version 9.0.0)

I still get the same error.

Why is the error showing libcurl.4.dylib provides version 7.0.0 when it is version 9.0.0? Is it pointing to an older version of the file? They both show this location /usr/local/php5/lib/libcurl.4.dylib

Thanks for your help.

2

2 Answers

0
votes

it basically reads:

requires version 9.0.0 or later, but *.dylib provides version 7.0.0

this means, you have to install these libraries at version 9.0.0, instead of version 7.0.0.

it's also strange that dlopen() complains about filename suffix .so.so

0
votes

I finally found a solution that works.

$ brew install httpd php72

I followed the instructions to setup the httpd.conf file and the php.ini file and Apache starts fine now.