Compiling & Installing Xdebug for PHP 5.2.5 (entropy.ch builds) on OS X 10.5
http://alexander.kirk.at/2008/12/26/debugging-php-on-mac-os-x/
http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105
It looks so complicated that you have to compile your xdebug sourcecode before you can install
The solution is a combination of Xdebug andmacgdbp.
Following on from I previous post detailing installing Xdebug for PHP (entropy.ch builds) on OS X, this post deals with Co Mpiling and installing Xdebug 2.0.2 forphp Version 5.2.5 (www.entropy.ch release 6) on OS x 10.5.2 Mac Pro 64-bit (2 X Qua D-core Intel Xeon).
The instructions below are a composite of those in the Xdebug README and the user ' Pilif/philip ' on the entropy forums posted the cflags settings used to compile Xdebug for x86 64bit architecture (the post here–thanks philip!)
The standard release of Marc Liyanage's PHP Apache Module may not be work under OS X 10.5, depending on the architecture of T He processor–you would know if you have the error message "The following install step failed:run postflight script for En tropyphp. Contact the software ... “.
Marc has been hard at work compiling a updated 4-way and binary to get all the trying and dependencies packages The latest version which I am using (works fine) and which this tutorial was based on isleopard:php 5.2.5 release 6 BETA
The binary distribution of Xdebug from ActiveState which I is using previously won ' t work with this version ofphp (i Bel Ieve I am right in saying it'll only work on a 32bit architecture but I could be down wrong) so it needs to be complied fr Om source–luckily It ' s pretty easy to do!
We need to make sure PHP 5.2.5 from Entropy site is installed and working, and that install directory /usr/local/php5/
Next we need to make sure it are using a php.ini file (probably located at/usr/local/php5/lib/php.ini–if not make a copy Of the ' php.ini-recommended ' file and rename it ' PHP.ini ').
We need to make sure this errors are set to is displayed in the INI file (display_errors = on anderror_reporting = E_all ).
The OS X developer tools must is installed (either from the Leopard install disk or the disks which with the came ). Run a phpinfo () page up of the local Web server and find the ' Extension_dir ' entry (in the Configuration->php Core sec tion) –copy that value down (it'll be something like/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/) Dow Nload the source code from Http://xdebug.org/In the terminal, CD to the directory which the source code tar file is in Unpack the Tarball:tar-xzf xdebug-2.0.2.tgz CD into the unpacked DIRECTORY:CD xdebug-2.0.2 Run phpize (using the Phpize Installed with the Entropy distribution, not the one installed Byosx):/usr/local/php5/bin/phpize configure:cflags= '-arch X86_64 './configure--enable-xdebug Run make:make Copy The compiled module to the directory your determined in step 1 (re Placing the directory shown here with your one if it is differant): CP modules/xdebug.so/usr/local/php5/lib/php/extensions /no-debug-non-zts-20060613/
Open your php.ini file (for the Entropy version it is At/usr/local/php5/lib/php.ini) and add the following:
[Xdebug]
Zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
(Obviously substitute your extensions directory path from stage 1 if it isn ' t the same as mine) Restart the Web server Reload the Phpinfo () page and look for the ' Xdebug ' section–if all are working it should show up a Long with a whole bunch of directives