Skip to content

Instantly share code, notes, and snippets.

@Zhuoqin
Last active February 13, 2019 16:27
Show Gist options
  • Save Zhuoqin/000d0d130dab3daaa0ffe04d6b15110f to your computer and use it in GitHub Desktop.
Save Zhuoqin/000d0d130dab3daaa0ffe04d6b15110f to your computer and use it in GitHub Desktop.
# clean old version if using brew
brew uninstall [email protected]
# php>7.3 some extensions like mcrypt won't work
brew install [email protected]
# edit php path
open ~/.zshrc
# add lines
# PHP Path
export PATH="/usr/local/opt/[email protected]/bin:$PATH
export PATH="/usr/local/opt/[email protected]/sbin:$PATH
# and also make sure your brew $PATH before your default $PATH in ~/.bash_profile
# For example⬇️ this might different depends your brew prefix path
# Brew Path
export PATH=/usr/local/bin:$PATH
# Default
export PATH=/usr/bin:/usr/sbin:/bin:/sbin:$PATH
# install extensions
sudo pecl install mcrypt-1.0.1
libmcrypt prefix? [autodetect] : yes
php -i | grep "mcrypt"
pecl install memcached
#"yes" to libmemcached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment