Installing xdebug on centos

Source: Internet
Author: User
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/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.