Skip to content

Instantly share code, notes, and snippets.

@pingyen
Created November 9, 2017 15:48
Show Gist options
  • Save pingyen/0802a8c03081f153ace75ac3199f8276 to your computer and use it in GitHub Desktop.
Save pingyen/0802a8c03081f153ace75ac3199f8276 to your computer and use it in GitHub Desktop.
Mac PHP 7.0 Installation Memo
$ brew install php70 --with-apache --with-homebrew-curl --with-pear --with-thread-safety
$ brew install php70-geoip php70-intl php70-tidy php70-pthreads --build-from-source
$ mv /usr/local/etc/php/7.0/conf.d/ext-pthreads.ini /usr/local/etc/php/7.0/php-cli.ini
--
$ brew uninstall httpd24
$ rm -rf /usr/local/etc/apache2
--
$ sudo vim /etc/apache2/httpd.conf
LoadModule php7_module /usr/local/opt/php70/libexec/apache2/libphp7.so
AddHandler php7-script php
DirectoryIndex index.html index.php
--
$ sudo apachectl restart
@pingyen
Copy link
Author

pingyen commented Nov 9, 2017

php71 has not supported pthreads.

@pingyen
Copy link
Author

pingyen commented Nov 9, 2017

For php71:

--with-apache -> --with-httpd

brew uninstall httpd24 -> brew uninstall httpd24 --ignore-dependencies

rm -rf /usr/local/etc/apache2 -> rm -rf /usr/local/etc/httpd

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