$ brew install php53-xdebug
==> Installing php53-xdebug dependency: php53
==> Downloading http://www.php.net/get/php-5.3.17.tar.bz2/from/this/mirror
######################################################################## 100.0%
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/php53/5.3.17 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.3 --with-config-file-path=/usr/local/et
==> make
==> make install
==> /usr/local/Cellar/php53/5.3.17/bin/pear config-set php_ini /usr/local/etc/php/5.3/php.ini
==> Caveats
For 10.5 and Apache:
Apache needs to run in 32-bit mode. You can either force Apache to start
in 32-bit mode or you can thin the Apache executable.
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php5_module /usr/local/Cellar/php53/5.3.17/libexec/apache2/libphp5.so
The php.ini file can be found in:
/usr/local/etc/php/5.3/php.ini
✩✩✩✩ PEAR ✩✩✩✩
If pear complains about permissions, 'Fix' the default PEAR permissions and config:
chmod -R ug+w /usr/local/Cellar/php53/5.3.17/lib/php
pear config-set php_ini /usr/local/etc/php/5.3/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/php53)/bin:$PATH"
PHP53 Extensions will always be compiled against this PHP. Please install them
using --without-homebrew-php to enable compiling against system PHP.
✩✩✩✩ FPM ✩✩✩✩
If you have installed the formula with --with-fpm, to launch php-fpm on startup:
* If this is your first install:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/php53/5.3.17/homebrew-php.josegonzalez.php53.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php53.plist
* If this is an upgrade and you already have the homebrew-php.josegonzalez.php53.plist loaded:
launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php53.plist
cp /usr/local/Cellar/php53/5.3.17/homebrew-php.josegonzalez.php53.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php53.plist
Mountain Lion comes 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 'org.php-fpm.plist' in old versions
of this formula.
Warning: Could not link php53. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link php53'
==> Summary
/usr/local/Cellar/php53/5.3.17: 459 files, 27M, built in 11.4 minutes
==> Installing php53-xdebug
==> Downloading http://xdebug.org/files/xdebug-2.2.1.tgz
######################################################################## 100.0%
==> /usr/local/Cellar/php53/5.3.17/bin/phpize
==> ./configure --prefix=/usr/local/Cellar/php53-xdebug/2.2.1 --with-php-config=/usr/local/Cellar/php53/5.3.17/bin/php-config --enable-xdebug
==> make
==> Caveats
To finish installing xdebug for PHP 5.3:
* /usr/local/etc/php/5.3/conf.d/ext-xdebug.ini was created,
do not forget to remove it upon extension removal.
* Restart your webserver.
* Write a PHP page that calls "phpinfo();"
* Load it in a browser and look for the info on the xdebug module.
* If you see it, you have been successful!
==> Summary
/usr/local/Cellar/php53-xdebug/2.2.1: 4 files, 372K, built in 32 seconds