In March I will start to give a lecture on web programming at the University of Applied Sciences Rosenheim where I’ll be using PHP for practical application. This week I started to setup a Debian-based (Etch) web-server with PHP 5.2 in a virtual-machine with VMWare. Part of this setup was getting XDebug2 integrated. It’s really awesome and my students definitely need to learn about it. Shame on me, because I haven’t written Derick a postcard, yet.

Building went well as usual but when I tried to integrate the extension inside php.ini it was all weird. When loading it with

zend_extension=xdebug.so

the error log told me:

Failed loading xdebug.so: xdebug.so: cannot open shared object file: No such file or directory.

The extension_dir has been properly configured in php.ini and I also have the xdebug.so file in the right place. When loading Xdebug as a normal extension everything went entirely well:

extension=xdebug.so

But I need to enable it as Zend extension. Whatever. I finally used the full path to xdebug.so to load it:

zend_extension=/path/to/extension_dir/xdebug.so

That worked. But do I have to give a full path here?


11 Responses to “Configuration issues with Xdebug on Debian Etch”  

  1. 1 s0enke

    yes, the full path must be provided for zend_extension directive. That’s by nature. And the OS doesn’t matter, it’s no Debian specific issue.

  2. 2 gaetano

    Short answer - yes!
    Somebody from internals will have to tell you why, though.
    One thing I really never understood is the difference between loading modules as extensions or zend_extensions, and wgat is the best choice if a module supports both ways…

  3. 3 Derick

    Yes, you have to use the full path for the zend_extension lines. It’s (unfortunately) just how it is. I tried to make it a bit clearer in the Xdebug docs now.

  4. 4 Sean Coates

    Yes, zend_extension needs a full path.

    S

  5. 5 Mikey

    Seems to be the way to go on Debian-like systems. I did not have any other choice on my linux box running Kubuntu 7something, only the full path worked.

    Which reminds me that I need to send a postcard as well…

  6. 6 Jan Schneider

    Yes, zend_extension always requires the full path. That caught me a few times too. Mix that with having to tackle _debug to the settings name when using a debug build, and you can be sure to mess this up at least once before getting it right. :)

  7. 7 Bruce Weirdan

    Yes, you have to use absolute path - this is clearly stated in Xdebug’s installation manual (and manuals for every other zend extensions out there).

  8. 8 Pierre

    Hi!

    Yes, a zend_extension is not the same as a standard php extension. It does not use the extension path. I always forget it too, or every two installs ;)

  9. 9 luckec

    I guessed that it wasn’t a Debian-specific problem. Debian is great and if the (dir-based) config wouldn’t be so modular I may not even have noticed this problem. Just because I probably would have used a full path in the first place.

    >(Derick): I tried to make it a bit clearer in the Xdebug docs now.
    Derick, there’s probably no way to miss this, now.
    BTW: Would you prefer a postcard from Munich, Berlin or Mumbai? ;-)

  10. 10 PHP Encoder

    In fact it would be great if extension could take full path as well…

  1. 1 PHPDeveloper.org

Leave a Reply




Add to Technorati Favorites