Suddenly, without any change, I get this error on apache start:
httpd: Syntax error on line 534 of /usr/local/etc/httpd/httpd.conf:
Cannot load /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so into server:
dlopen(/usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so, 10):
Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.62.dylib
Referenced from: /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
Reason: image not found
Checking for the files they do exist on the folders so I’m wondering why this error is occurring.
If I change on httpd.conf this line
LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so
to
LoadModule php7_module /usr/libexec/apache2/libphp7.so
Apache does start but now the SQL PDO driver is not working like it used to be… Any thoughts why this error occurred in the first place or how to fix it properly?
2
Answers
you can try upgrading and re-installing the Homebrew PHP version should fix that. It worked for me with MacOS Mojave.
Then check if your httpd.conf is linked to this PHP:
And, re-start apache:
As mentioned by @LuizEduardoMPF
brew update
and
brew upgrade
resolved the issue for me. I didn’t need to reinstall PHP or make any changes to the config file.I’m using Mac os Mojave.
Just sharing what worked for me.