XDebug with Zend Server CE on MacOS X Snow Leopard

After (finally) upgrading my Mac to Snow Leopard (a little late – I know) the xdebug module stopped working.
I got “Failed loading /usr/local/zend/lib/php_extensions/xdebug.so: (null)” when launching php in Terminal (e.g. with running phpunit).

Reinstalling xdebug did not help and I eventually found the solution in the Zend forums.

Here are the steps I used to get the current xDebug version (2.1.1) installed:

sudo -s 
ftp http://pecl.php.net/get/xdebug-2.1.1.tgz
tar zxvf xdebug-2.1.1.tgz
cd xdebug-2.1.1
export CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" 
export CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" 
export CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" 
export LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
./configure --with-php-config=/usr/local/zend/bin/php-config
cp modules/xdebug.so /usr/local/zend/lib/php_extensions/xdebug.so
This entry was posted in PHP and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s