Skip to content

Instantly share code, notes, and snippets.

@theodson
Last active July 9, 2018 01:35
Show Gist options
  • Save theodson/3e5a792ed06b70a1a0799603bfa79dca to your computer and use it in GitHub Desktop.
Save theodson/3e5a792ed06b70a1a0799603bfa79dca to your computer and use it in GitHub Desktop.
# try to figure out simple multi php install
# https://www.npmjs.com/package/switch-php (yarn or npm - your choice)
yarn global add switch-php
# npm install --global switch-php
for version in 7.0 7.1 7.2
do
brew reinstall php@$version
switch-php -v $version
pecl install redis imagick apcu xdebug memcached
# check versions
php -v;
fpm-php -v
# check ext
php -m | egrep 'redis|imagick|apcu|xdebug|memcached'
pecl list -a | egrep 'redis|imagick|apcu|xdebug|memcached'
done
@adrianb93
Copy link

Worked perfectly! Thank you.

@jacksonfrankland
Copy link

I hade to run these first but than it worked perfectly

brew remove --force --ignore-dependencies httpd
brew remove --force --ignore-dependencies php70-xdebug php71-xdebug php72-xdebug
brew remove --force --ignore-dependencies php70-imagick php71-imagick php72-imagick
brew remove --ignore-dependencies --force php70 php71 php72

@theodson
Copy link
Author

theodson commented Jul 9, 2018

I had issues with composer global, specifically phing/phing so opted for https://github.com/consolidation/cgr

composer global remove phing/phing
composer global update
composer global require consolidation/cgr

# setup following cgr readme
cgr phing/phing

Thats solved it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment