Mac OS X Leopard, Entropy PHP and XDebug Extension (64bit)

As all my entension in PHP must be compiled in 64bit to load into PHP, I’ve decided to give the details on how I added xdebug to Entropy PHP 5.2.5 beta 6 on Mac OS X Leopard running on an Intel Core 2 Duo.

First, download the source code for xdebug at the following site

XDebug (source code [2.0.4 as of this writing])

Then unpack the file into a directory someone on your system.

From the terminal, go to the folder where you unpacked everything. It should be xdebug-2.0.4. Then type the following commands:

  • cd xdebug-2.0.4
  • phpize
  • MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load” ./configure –enable-xdebug
  • make

Now wait for it to complete the compiling process.  When it is done, begin these commands:

  • cd modules
  • chown root:wheel xdebug.so
  • sudo mv xdebug.so /usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/
  • cd /usr/local/php/php.d
  • sudo pico 50-extension-xdebug.ini

In the text editor, type the following line, then save the file with Control-O (WriteOut), then exit, Control-X.


Once you’ve save the file and returned back to the terminal you can type in the following to restart Apache2:

  • sudo apachectl graceful

To make sure all went well, type in this to see if Xdebug is showing in the PHP information.

  • php -v

Should display something like this.

PHP 5.2.5 (cli) (built: Jan 24 2008 00:33:14)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Xdebug v2.0.4, Copyright (c) 2002-2008, by Derick Rethans

If the Xdebug v2.0.4 line shows up, then you’ve succesfully installed the 64bit version of Xdebug for Entropy PHP in Mac OS X Leopard.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)