1

Since homebrew updated me to php@7.1 from php71 my php extensions have become disabled:

  • imagick
  • opcache
  • xdebug

I've read that these are now included and cannot be installed separately. Before, running brew install php70-opcache etc. enabled the extensions.

How do I re-enable these PHP extensions?

See: macOS php71 became php@7.1 with brew.

dbj44
  • 1,919
  • 2
  • 24
  • 45

1 Answers1

0

To fix this issue, I ran:

brew link --overwrite --force php@7.1

Then I added the below lines to the bottom of ~/.bash_profile

export PATH="/usr/local/opt/php@7.1/bin:$PATH"
export PATH="/usr/local/opt/php@7.1/sbin:$PATH"

Reloaded with source ~/.bash_profile. Then, I restarted PHP.

Now when I run php --version, I see that my extensions are back.

dbj44
  • 1,919
  • 2
  • 24
  • 45