Search code examples
phplinuxapachelampxdebug

Xdebug and PHP not working on my server


I've had xdebug and php configured many times in the passed, but going back over my old notes, is failing to help me get it configured again.

I have done the following:

  1. Installed LAMP
  2. Installed php5-xdebug
  3. Restarted apache sudo /etc/init.d/apache2 restart
  4. The /etc/php5/apache2/conf.d/xdebug.ini now looks like this:

xdebug.ini

zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
xdebug.remote_enable=On
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"

I create a php file which just contains phpinfo(); and when I load that page in the browser, I don't get an xdebug section as normal which contains all the xdebug details like

xdebug.collect
xdebug.dump
xdebug.profiler

etc etc.

What have I don't wrong this time round?

The OS is Ubuntu 12.04
PHP version is 5.3.10
Apache version is 2.2.22
Xdebug version is 2.1.0-1

Solution

  • I would go through the following steps:

    • Verify that the .so file really exists at that path (copy/paste and ls)
    • Use the output of phpinfo() to tell you which .ini files are being parsed, is yours included? Is the apache2/*.ini dir being included?
    • Check the apache error log for any errors that might have occurred at restart