oshirowanen
oshirowanen

Reputation: 15925

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

Upvotes: 4

Views: 9397

Answers (3)

Lee Woodman
Lee Woodman

Reputation: 1329

After i updated from PHP 5.3 to 5.5 i was seeing this error:

Failed loading /usr/lib/php5/20090626+lfs/xdebug.so: /usr/lib/php5/20090626+lfs/xdebug.so: cannot open shared object file: No such file or directory

To fix i changed the path to xdebug.so in

/etc/php5/apache2/conf.d/20-xdebug.ini

from

/usr/lib/php5/20090626+lfs/xdebug.so

to

/usr/lib/php5/20121212/xdebug.so

Upvotes: 3

XciA
XciA

Reputation: 338

Do a sudo find / -name 'xdebug.so'

and copy the location of this file in xdebug.ini and php.ini file

Upvotes: 0

James C
James C

Reputation: 14149

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

Upvotes: 4

Related Questions