Skip to content

Instantly share code, notes, and snippets.

@pingyen pingyen/php70.txt

Created Nov 9, 2017
Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

pingyen commented Nov 9, 2017

php71 has not supported pthreads.

@pingyen

This comment has been minimized.

Copy link
Owner 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
You can’t perform that action at this time.