tags:

views:

190

answers:

1

I'm trying to get XDebug to work with PHP 5.2.11 installed with MacPorts on OSX Snow Leopard. I installed Pear with go-pear, then used PECL to install XDebug. I copied xdebug.so that it compiled to the extension_dir, /opt/local/lib/php/extensions/no-debug-non-zts-20060613/. I have an xdebug.ini file which (according to phpinfo) is loading correctly. xdebug.ini calls:

zend_extension="/opt/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"

It seems to show a stack trace on errors, but if I try to add any xdebug settings, like xdebug.collect_params, it doesn't even do that. And my PHP error log shows:

PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20060613//opt/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so'

Note that it has extension_dir twice there. It appears correctly in phpinfo. I've tried using 'extension' instead of 'zend_extension' and 'xdebug.so' instead of the full path, but it does the same thing.

Does anyone know why the path is being doubled in the module lookup, or what else might be wrong here? Thank you!

A: 

I had this same exact issue. What I did was use the macports xdebug package: $ sudo port install php5-xdebug

Eric Butera
Thanks! Before seeing your answer, I reinstalled PHP withsudo port install php52 +mysql5 +pear +debug(I thought maybe +debug was related to xdebug, but I don't think it is now. I added +pear because XDebug is a Pear/PECL extension.)That alone + xdebug.so didn't work... the weird error disappeared but the module didn't load. So I installed php5-xdebug as you suggested, that didn't work either. Looking into it further, I realized +debug (which translates to --enable-debug for configure) requires zend_extension_debug instead of zend_extension -- and that (with the full .so path) worked. Thx!
thebuckst0p