Join The San Francisco PHP Meetup Group

You'll get invited to our Meetups as soon as they're scheduled!

compiling xdebugger extension for netbeans ide for php on a mac for xampp

From: Janis Rough
Sent on: Friday, January 23, 2009 12:42 PM
Hi everyone:
The xdebugger for Windows has a compiled version but I can't find one for the mac for xampp.   I don't know how to install it from PECL on my mac on Xampp either so I'm trying to compile xdebug from source?   I unpacked the tarball and ran phpize on xdebug-2.0.4 as per instructions below and got an error about autoconf.   Here are the errors from the terminal window:

j-rs-computer:/Source jr$ cd xdebug-2.0.4
j-rs-computer:/Source/xdebug-2.0.4 jr$ /usr/bin/phpize xdebug-2.0.4
grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:       
Zend Module Api No:    
Zend Extension Api No: 
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.

This autoconf error could it be the problem with disabling the Zend optimizer?  I looked in php.ini for Xampp and did not find a reference to the zend optimizer?  See #3.

------on netbeans.org these instructions for installing with Xampp for the mac-------

Because XAMPP does not contain the XDebug debugger, you need to install and set up the XDebug as a component.

  1. Download and compile XDebug source files. The download link for source files is listed under Releases.
  2. Install XDebug into the ../xampplite/php/ folder.
  3. Because Zend optimizer blocks XDebug, you need to disable Zend optimizer first. In the ../xampplite/php/php.ini file, locate the relevant lines and remove them or mark as comments.
  4. Run the XAMPP Control Panel and restart the Apache web server.
  5. Find more information on configuring XDebug here.
------also these instructions from www.xdebug.org--------- [ I am stuck on #3]

Compiling

You compile Xdebug separately from the rest of PHP. Note, however, that you need access to the scripts 'phpize' and 'php-config'. If your system does not have 'phpize' and 'php-config', you will need to compile and install PHP from a source tarball first, as these script are by-products of the PHP compilation and installation processes. (Debian users can install the required tools with apt-get install php4-dev, or apt-get install php5-dev). It is important that the source version matches the installed version as there are slight, but important, differences between PHP versions. Once you have access to 'phpize' and 'php-config', do the following:

  1. Unpack the tarball: tar -xzf xdebug-2.0.2.tgz. Note that you do not need to unpack the tarball inside the PHP source code tree. Xdebug is compiled separately, all by itself, as stated above.
  2. cd xdebug-2.0.2
  3. Run phpize: phpize (or /path/to/phpize if phpize is not in your path). See in the table below which version numbers it should show for different PHP versions. Make sure you use the phpize that belongs to the PHP version that you want to use Xdebug with.
  4. ./configure --enable-xdebug (or: ./configure --enable-xdebug --with-php-config=/path/to/php-config if php-config is not in your path).
Please help me get xdebugger working.
Thanks and regards,
Janis

Janis Rough