views:

707

answers:

2

When I installed Xdebug through pecl, it added the following line to my php.ini file.

extension="xdebug.so"

and everything I used worked. Until today.

Today I was having trouble setting up Xdebug for interactive debugging. I couldn't get anythign working until I changed the above to

zend_extension="/usr/local/lib/php/extensions/xdebug.so"

(Caveat: I think this is what got me working, but I'm not 100% sure)

This raised the question in my mind. What's the difference in loading an extension via extension= vs. zend_extension?

+1  A: 

zend_extension denote's Zend's own extensions, such as the optimizer, framework etc.

extension is for everything else, (PEAR,PECL,etc)

So I'm not really sure why changing it to Zend worked since Xdebug is not a zend product, and it may not have been what solved the problem.

Perhaps it's just putting in the full path that helped? Try

extension="/usr/local/lib/php/extensions/xdebug.so"
Jeremy Morgan
For the extension line in php.ini, you can't use absolute paths. Unfortunately.
Tony Arkles
+3  A: 

At the core of the PHP language (more like the interpreter, bacause a language is just a specification) is a software (interpreter, bytecode compiler) called "Zend Engine" developed by Zend.

Every module which messes with this core should be installed as a "zend_extension".

And yet, to solve your problem, ignore this attempt at explanation and consult the docs of the extension you're configuring - http://www.xdebug.org/docs/install.

Milen A. Radev