-
-
Save SObS/111b0aa3ae191361c09c5233ef24be40 to your computer and use it in GitHub Desktop.
Install Thread Safe PHP, along with pthreads extension on OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: Based on http://justinhileman.info/article/reinstalling-php-on-mac-os-x/ | |
# Refer to the page in case of any issues | |
# Assumed that you have Brew install; else run the following commands | |
# xcode-select --install | |
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew tap homebrew/dupes | |
brew tap homebrew/versions | |
brew tap homebrew/homebrew-php | |
brew update && brew upgrade | |
# Note: Following may be updated for appropriate PHP version | |
# Note: Breaks every once in a while, so --build-from-source | |
brew install php56 --build-from-source --with-thread-safety --with-httpd24 --without-snmp --with-pear --without-ldap | |
sudo mv /etc/php.ini /etc/php.ini.old | |
sudo ln -s /usr/local/etc/php/5.6/php.ini /etc/php.ini | |
# TODO: change upload_max_filesize and post_max_size to 1024M | |
echo "LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so" > $(brew --prefix homebrew/php/php56)/entropy-php.conf | |
sudo rm /etc/apache2/other/+php-osx.conf | |
sudo ln -s $(brew --prefix homebrew/php/php56)/entropy-php.conf /etc/apache2/other/+php-osx.conf | |
echo "AddType application/x-httpd-php .php" > /etc/apache2/other/+php-osx.conf | |
# Note: remove, or rename php, phpize, etc. binaries at /usr/bin/php* | |
# You might have to run brew link --overwrite | |
brew link php56 | |
# PHP5.6 needs legacy driver mongo, instead of mongodb | |
sudo pecl install mongo | |
# brew install php56-mongo --build-from-source | |
brew install php56-mcrypt --build-from-source | |
brew install php56-opcache --build-from-source | |
brew install php56-xdebug --build-from-source | |
#sudo pecl install pthreads |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment