I just installed PHP 5.4.19 on my os X 10.6.8 Mac using homebrew. I was previously using PHP 5.3.26 probably installed with MacPorts.
If I type
php -v in terminal, I get PHP 5.4.19. If I load a
phpinfo() file through my localhost I get PHP 5.3.26. How do instruct Apache to load my new installation of PHP?
If I run
php --ini, I get:
Configuration File (php.ini) Path: /usr/local/etc/php/5.4 Loaded Configuration File: /usr/local/etc/php/5.4/php.ini Scan for additional .ini files in: /usr/local/etc/php/5.4/conf.d Additional .ini files parsed: /usr/local/etc/php/5.4/conf.d/ext-mcrypt.ini
My /etc/apache2/httpd.conf file has this setting:
LoadModule php5_module libexec/apache2/libphp5.so #LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so
I have tried changing the LoadModule in my httpd.conf file to:
but I get an error which reads:
httpd: Syntax error on line 118 of /private/etc/apache2/httpd.conf: Cannot load /usr/local/Cellar/php54/5.4.19/libexec/apache2/libphp5.so into server: dlopen(/usr/local/Cellar/php54/5.4.19/libexec/apache2/libphp5.so, 10): Library not loaded: /usr/local/opt/curl/lib/libcurl.4.dylib\n Referenced from: /usr/local/Cellar/php54/5.4.19/libexec/apache2/libphp5.so\n Reason: Incompatible library version: libphp5.so requires version 8.0.0 or later, but libcurl.4.dylib provides version 6.0.0