Simple steps to Installing Xdebug on Ubuntu Server


First install pear


sudo apt-get install php5-dev php-pear

Now install xdebug thru PECL.


sudo pecl install xdebug

Now we need to find where xdebug.so went (the compiled module)


find / -name 'xdebug.so' 2> /dev/null /usr/lib/php5/20090626/xdebug.so

20090626 is for my case it might be different for you

Then edit php.ini


sudo gedit /etc/php5/apache2/php.ini

Add the following line:


zend_extension="/usr/lib/php5/20090626/xdebug.so"

Then restart apache


sudo /etc/init.d/apache2 restart

for changes to take effect.


sudo /etc/init.d/apache2 restart

For checking it is install or not —

create a file on /var/www/  as info.php

and open it

sudo gedit /var/www/info.php

and write —

<?php
phpinfo();
?>

Now we call that file in a browser (e.g. http://localhost/info.php):

Xdebug Test

Xdebug Test

Cheers ………

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: