0
votes

I've been trying to debug an issue with a PHP-based application which is too complex for a simple vardump so I wanted to correctly configure XDebug on my system. I'm using MAMP on OSX. I've gone through the wizard on the XDebug website and followed the steps provided but for some reason I can't get XDebug to show up in my phpinfo. The only thing I've noticed is that phpize returns

PHP Api Version: 20090626

Zend Extension Api No: 220090626

Which I believe is my local PHP5.3 version and the wizard says I should be getting

Zend Module Api No: 20121212

Zend Extension Api No: 220121212

Which is the version used by MAMP, PHP5.5

Edit: I've put the following in php.ini

[xdebug]

zend_extension="/Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"

xdebug.remote_enable=1

xdebug.remote_host=localhost

xdebug.remote_port=9000

xdebug.remote_handler=dbgp

xdebug.remote_autostart=1

Any suggestions on how to set this up correctly? I've been looking at it for a few days now and its driving me crazy.

2
What is an output of >php -v - E_p
Returns PHP 5.3.10-1ubuntu3.15, but MAMP is using PHP 5.5.10 - Ryan B
Looks like you installed xdebug for your local version of PHP not MAMP one. - E_p
Does this file exist /Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so? - E_p
And do you run cli or through browser? - E_p

2 Answers

0
votes

Below is valid if your extension compiled and installed properly.

Never worked with MAMP but had similar issue(Ubuntu) after pecl install it would not add xdebug as an extension

In your php.ini or /path/to/php/conf.d/xdebug.ini (/etc/php5/conf.d/20-xdebug.ini on Ubuntu))

Make sure that it has

zend_extension=/usr/lib/php5/20100525/xdebug.so

As usually it has:

extension=/usr/lib/php5/20100525/xdebug.so
0
votes

You did not install the Xdebug.

Pecl will not help you if you are using php53.

PHP.ini changes does not help.

You probably installed the wrong version of Xdebug. They are different for different php versons.

MacPorts have just the version for you, check it out here:

https://www.macports.org/ports.php?by=name&substr=php53-xdebug