When I install PHP using Homebrew, any extensions that I attempt to load (including the core extensions such as
gd2) throw an
Unable to load dynamic library error during any usage. Is there a solution available?
The error thrown is as follows:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php70/7.0.15_8/lib/php/extensions/no-debug-non-zts-20151012/php_mysqli.dll' - dlopen(/usr/local/Cellar/php70/7.0.15_8/lib/php/extensions/no-debug-non-zts-20151012/php_mysqli.dll, 9): image not found in Unknown on line 0
The folder referenced,
/usr/local/Cellar/php70/7.0.15_8/lib/php/extensions/no-debug-non-zts-20151012, does not exist. The command used for installation was
brew install homebrew/php/php70 --with-httpd24 --with-pear. I also attempted without the
I note that while the error refers to DLL files for some reason, changing these to SO files in the php.ini file does not resolve the problem, as the files still do not exist anywhere on the system.
I have now attempted this installation on a clean macOS 10.12.3 system, trying PHP 5.6 first and then PHP 7.0. Both experience the same issue.
I have also opened an issue on GitHub, but I was hoping someone might have experienced a similar issue and managed to resolve the problem.