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.

  • so you're not using 'brew' to install? – strobelight Mar 4 '17 at 11:29
  • @strobelight Well noticed, I forgot to put that in my post. Unfortunately I am using brew install. – Forest Mar 6 '17 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.