Installing xdebug on centos
Here are exact steps to follow:
1. You need to install PHP's devel package for PHP commands execution
yum install php-devel
Make sure you also have PHP-paer package installed
yum install php-pear
2. Next install GCC and gcc C ++ compilers to compile xdebug extension yourself.
yum install gcc gcc-c++ autoconf automake
3. Compile xdebug
pecl install Xdebug
4. Find the php. ini file using
locate php.ini
And add the following line
[xdebug]
zend_extension="/usr/lib64/php/modules/xdebug.so"
xdebug.remote_enable = 1
5. Restart Apache
service httpd restart
6. test if it works-create test. php with the following code
<?php phpinfo() ?>
And check if you have the following output
Summary: You installed xdebug by Derick
Rethans as zend_extension. Installing xdebug as Zend extension is very important because that way you can debug step by step in different ides.
If you like to compile the xdebug. So object file yourself in order to get the latest version of xdebug. So here are the steps to follow:
1. Download latest xdebug-X.Y.Z.tgz from xdebug web site
2. Unpack the downloaded file with tar-xvzf xdebug-X.Y.Z.tgz to some test folder
3. Run: CD xdebug-X.Y.Z
4. Run: phpize (to prepare the environment)
5. Run:./configure
6. Run: Make (now you have xdebug. So created ;)
7. Copy xdebug. So to your modules file (in my case/usr/lib64/PHP/modules)
8. Make sure you have the following in PHP. ini
zend_extension = /usr/lib64/php/modules/xdebug.so
9. Restart the webserver
From: http://programming-review.com/installing-xdebug-on-centos/