Skip to content

Instantly share code, notes, and snippets.

@BenJam
Last active December 10, 2015 11:59
Show Gist options
  • Save BenJam/4431503 to your computer and use it in GitHub Desktop.
Save BenJam/4431503 to your computer and use it in GitHub Desktop.
Warning: Your Homebrew is outdated
You haven't updated for at least 24 hours, this is a long time in brewland!
==> Downloading http://www.php.net/get/php-5.4.10.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php54-5.4.10
==> Downloading patches
==> Patching
patching file Makefile.global
patch unexpectedly ends in middle of line
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php54/5.4.10 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.4 --with-config-file-path=/usr/local/etc/php/5.4 --with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-pcntl --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-bcmath --enable-calendar --with-zlib=/usr/local/Cellar/zlib/1.2.7 --with-ldap --with-ldap-sasl=/usr --with-xmlrpc --with-kerberos=/usr --with-xsl=/usr --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr/local/Cellar/freetype/2.4.10 --with-mcrypt=/usr/local/Cellar/mcrypt/2.5.8 --with-jpeg-dir=/usr/local/Cellar/jpeg/8d --with-png-dir=/usr/local/Cellar/libpng/1.5.13 --with-gettext=/usr/local/Cellar/gettext/0.18.1.1 --with-snmp=/usr --with-libedit --mandir=/usr/local/Cellar/php54/5.4.10/share/man --with-mhash --with-curl --enable-zend-signals --enable-dtrace --with-bz2=/usr --with-openssl=/usr --enable-fpm --with-fpm-user=_www --with-fpm-group=_www --with-mysql-sock=/tmp/mysql.sock --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-iodbc --with-pdo-odbc=generic,/usr,iodbc
==> make
==> make install
==> /usr/local/Cellar/php54/5.4.10/bin/pear config-set php_ini /usr/local/etc/php/5.4/php.ini
==> Caveats
The php.ini file can be found in:
/usr/local/etc/php/5.4/php.ini
✩✩✩✩ PEAR ✩✩✩✩
If PEAR complains about permissions, 'fix' the default PEAR permissions and config:
chmod -R ug+w /usr/local/Cellar/php54/5.4.10/lib/php
pear config-set php_ini /usr/local/etc/php/5.4/php.ini
✩✩✩✩ Extensions ✩✩✩✩
If you are having issues with custom extension compiling, ensure that this php is
in your PATH:
PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH"
PHP54 Extensions will always be compiled against this PHP. Please install them
using --without-homebrew-php to enable compiling against system PHP.
✩✩✩✩ FPM ✩✩✩✩
To launch php-fpm on startup:
* If this is your first install:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/php54/5.4.10/homebrew-php.josegonzalez.php54.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist
* If this is an upgrade and you already have the homebrew-php.josegonzalez.php54.plist loaded:
launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist
cp /usr/local/Cellar/php54/5.4.10/homebrew-php.josegonzalez.php54.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php54.plist
The control script is located at /usr/local/Cellar/php54/5.4.10/sbin/php54-fpm
Mountain Lion comes with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /sbin is before /usr/sbin in your PATH:
PATH="/sbin:$PATH"
You may also need to edit the plist to use the correct "UserName".
Please note that the plist was called 'org.php-fpm.plist' in old versions
of this formula.
==> Caveats
To have launchd start php54 at login:
ln -sfv /usr/local/opt/php54/*.plist ~/Library/LaunchAgents
Then to load php54 now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php54.plist
==> Summary
/usr/local/Cellar/php54/5.4.10: 490 files, 37M, built in 5.0 minutes
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~67/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
PHP 5.4.9 (cli) (built: Dec 27 2012 11:21:24)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment