Homebrew throwing unable to load dynamic library error with all versions of PHP on macOS Sierra

1

When I install PHP using Homebrew, any extensions that I attempt to load (including the core extensions such as mysqli and 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 --with-pear flag.

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.

Forest

Posted 2017-02-26T11:06:36.273

Reputation: 193

so you're not using 'brew' to install? – strobelight – 2017-03-04T11:29:15.833

@strobelight Well noticed, I forgot to put that in my post. Unfortunately I am using brew install. – Forest – 2017-03-06T08:48:33.780

No answers