1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
| Last login: Mon Oct 2 08:25:24 on ttys000 localhost:~ czh$ brew install php70 --with-fpm --with-gmp --with-imap --with-tidy --with-debug --with-mysql --with-libmysql Updating Homebrew... ==> Installing php70 from josegonzalez/php ==> Installing dependencies for josegonzalez/php/php70: gmp, icu4c, imap-uw, libxml2, unixodbc ==> Installing josegonzalez/php/php70 dependency: gmp ==> Downloading https://homebrew.bintray.com/bottles/gmp-6.1.2.sierra.bottle.1.t ######################################################################## 100.0% ==> Pouring gmp-6.1.2.sierra.bottle.1.tar.gz 🍺 /usr/local/Cellar/gmp/6.1.2: 18 files, 3.1MB ==> Installing josegonzalez/php/php70 dependency: icu4c ==> Downloading https://homebrew.bintray.com/bottles/icu4c-59.1.sierra.bottle.ta ######################################################################## 100.0% ==> Pouring icu4c-59.1.sierra.bottle.tar.gz ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local, because macOS provides libicucore.dylib (but nothing else).
If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.bash_profile echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/icu4c/lib CPPFLAGS: -I/usr/local/opt/icu4c/include
==> Summary 🍺 /usr/local/Cellar/icu4c/59.1: 246 files, 65.4MB ==> Installing josegonzalez/php/php70 dependency: imap-uw ==> Downloading https://homebrew.bintray.com/bottles/imap-uw-2007f.sierra.bottle ######################################################################## 100.0% ==> Pouring imap-uw-2007f.sierra.bottle.tar.gz 🍺 /usr/local/Cellar/imap-uw/2007f: 151 files, 9.0MB ==> Installing josegonzalez/php/php70 dependency: libxml2 ==> Downloading https://homebrew.bintray.com/bottles/libxml2-2.9.5.sierra.bottle ######################################################################## 100.0% ==> Pouring libxml2-2.9.5.sierra.bottle.tar.gz ==> Caveats This formula is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.
If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set: LDFLAGS: -L/usr/local/opt/libxml2/lib CPPFLAGS: -I/usr/local/opt/libxml2/include
If you need Python to find bindings for this keg-only formula, run: echo /usr/local/opt/libxml2/lib/python2.7/site-packages >> /usr/local/lib/python2.7/site-packages/libxml2.pth mkdir -p /Users/czh/Library/Python/2.7/lib/python/site-packages echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/czh/Library/Python/2.7/lib/python/site-packages/homebrew.pth ==> Summary 🍺 /usr/local/Cellar/libxml2/2.9.5: 281 files, 10.4MB ==> Installing josegonzalez/php/php70 dependency: unixodbc ==> Downloading https://homebrew.bintray.com/bottles/unixodbc-2.3.4.sierra.bottl ######################################################################## 100.0% ==> Pouring unixodbc-2.3.4.sierra.bottle.2.tar.gz 🍺 /usr/local/Cellar/unixodbc/2.3.4: 43 files, 1.8MB Warning: josegonzalez/php/php70: this formula has no --with-fpm option so it will be ignored! Warning: josegonzalez/php/php70: this formula has no --with-mysql option so it will be ignored! Warning: josegonzalez/php/php70: this formula has no --with-tidy option so it will be ignored! ==> Installing josegonzalez/php/php70 --with-gmp --with-debug --with-i ==> Downloading https://php.net/get/php-7.0.23.tar.bz2/from/this/mirror ==> Downloading from https://secure.php.net/get/php-7.0.23.tar.bz2/from/this/mir ######################################################################## 100.0% ==> ./configure --prefix=/usr/local/Cellar/php70/7.0.23_15 --localstatedir=/usr/ ==> make ==> make install ==> Caveats The php.ini file can be found in: /usr/local/etc/php/7.0/php.ini
✩✩✩✩ Extensions ✩✩✩✩
If you are having issues with custom extension compiling, ensure that you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:
PATH="/usr/local/bin:$PATH"
PHP70 Extensions will always be compiled against this PHP. Please install them using --without-homebrew-php to enable compiling against system PHP.
✩✩✩✩ PHP CLI ✩✩✩✩
If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc, ~/.zshrc, ~/.profile or your shell's equivalent configuration file: export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"
GMP has moved to its own formula, please install it by running: brew install php70-gmp
✩✩✩✩ FPM ✩✩✩✩
To launch php-fpm on startup: mkdir -p ~/Library/LaunchAgents cp /usr/local/opt/php70/homebrew.mxcl.php70.plist ~/Library/LaunchAgents/ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php70.plist
The control script is located at /usr/local/opt/php70/sbin/php70-fpm
OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:
PATH="/usr/local/sbin:$PATH"
You may also need to edit the plist to use the correct "UserName".
Please note that the plist was called 'homebrew-php.josegonzalez.php70.plist' in old versions of this formula.
With the release of macOS Sierra the Apache module is now not built by default. If you want to build it on your system you have to install php with the --with-httpd24 option. See brew options php70 for more details.
To have launchd start josegonzalez/php/php70 now and restart at login: brew services start josegonzalez/php/php70 ==> Summary 🍺 /usr/local/Cellar/php70/7.0.23_15: 313 files, 42.1MB, built in 6 minutes 36 seconds localhost:~ czh$ echo 'export PATH="$(brew --prefix php70)/bin:$PATH"' >> ~/.bash_profile #for php localhost:~ czh$ echo 'export PATH="$(brew --prefix php70)/sbin:$PATH"' >> ~/.bash_profile #for php-fpm localhost:~ czh$ echo 'export PATH="/usr/local/bin:/usr/local/sbib:$PATH"' >> ~/.bash_profile #for other brew install soft localhost:~ czh$ source ~/.bash_profile localhost:~ czh$ php -v PHP 7.0.23 (cli) (built: Oct 2 2017 08:35:23) ( NTS DEBUG ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies localhost:~ czh$
|