3

When trying to install APCu via brew I get the error

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-apcu/apcu.so' - dlopen(/usr/local/opt/php56-apcu/apcu.so, 9): Symbol not found: _zend_signal_globals Referenced from: /usr/local/opt/php56-apcu/apcu.so Expected in: flat namespace in /usr/local/opt/php56-apcu/apcu.so in Unknown on line 0

This occurs no matter how I install APCu

brew install php56-apcu
brew install --build-from-source php56-apcu
brew install php56-apcu --enable-apc-bc

APC fails to appear in phpinfo too.

Opcache is install fine, as is php-intl

Jake N
  • 10,535
  • 11
  • 66
  • 112
  • no disrespect, but got to ask : what do `which php` and `php -v` reveal? so easy to miss a few crucial steps on OSX. – YvesLeBorg Sep 26 '16 at 17:03
  • @YvesLeBorg version is 5.6.24 and /usr/bin/php (I think, I'm away from my machine right now) – Jake N Sep 26 '16 at 17:14
  • 1
    /usr/bin/php would necessarily be the apple distribution php on El-Capitan (cant be certain about previous versions, OSX is such a moving target). Try to add `/usr/local/bin` as top dog in your path (.bash_profile) and retry in a newly instantiated terminal window. – YvesLeBorg Sep 26 '16 at 17:15
  • That has sorted it. I have posted a follow up now because apache is ignoring my brew php version http://stackoverflow.com/questions/39721251/forcing-apache2-to-use-php56-from-homebrew thanks again – Jake N Sep 27 '16 at 09:40

1 Answers1

3

the executable in /usr/bin/php would necessarily be the apple distribution php on El-Capitan (cant be certain about previous versions, OSX is such a moving target).

Try to add /usr/local/bin as top dog in your path (in file .bash_profile) and retry in a newly instantiated terminal window.

YvesLeBorg
  • 9,070
  • 8
  • 35
  • 48