Skip to content


Configure Xdebug with Zend Server 5.6 on OSX

This is a quick note for those running into issues getting xdebug installed on Zend Server 5.6 using pear/pecl. This has to do with the fact that xdebug is being installed as 64bit vs 32bit on OSX.

Download and Configure Xdebug

Download Xdebug

Extract the contents:
$: tar xzvfp xdebug-2.2.1.tgz

$: cd xdebug-2.2.1

$: phpize

$: ./configure MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS=”-arch i386 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch i386 -g -Os -pipe” CXXFLAGS=”-arch i386 -g -Os -pipe” LDFLAGS=”-arch i386 -bind_at_load”

$: make

$: cp modules/xdebug.so /usr/local/zend/lib/php_extensions/xdebug.so

Modify INI Files and Restart Apache

Comment out all the lines in the debugger.ini file
$: vi /usr/local/zend/etc/conf/debugger.ini

Comment out all the lines in the optimizerplus.ini file
$: vi /usr/local/zend/etc/conf/optimizerplus.ini

Add xdebug.ini file
$: vi /usr/local/zend/etc/conf/xdebug.ini
With Contents:
zend_extension=/usr/local/zend/lib/php_extensions/xdebug.so

xdebug.remote_enable=On
xdebug.remote_host=”localhost”
xdebug.remote_port=9000
xdebug.remote_handler=”dbgp”

Restart Apache
$: sudo /usr/local/zend/bin/apachectl restart

Posted in Debugging, PHP, Zend Server.