Skip to content

Instantly share code, notes, and snippets.

@devlifeX
Forked from kramarama/xdebug
Last active March 12, 2017 23:06
Show Gist options
  • Save devlifeX/a45d7fb5dd6946920036d2e462f88487 to your computer and use it in GitHub Desktop.
Save devlifeX/a45d7fb5dd6946920036d2e462f88487 to your computer and use it in GitHub Desktop.
install xdebug on centos
http://xdebug.org/install.php#configure-php
http://blog.jetbrains.com/phpstorm/2013/08/debugger-configuration-validation-with-phpstorm/
on CentOS:
1. You need to install PHP’s devel package for PHP commands execution
yum install php-devel
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
xdebug.remote_connect_back = 1
xdebug.profiler_enable = 0
xdebug.profiler_append = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "/var/xdebug"
xdebug.remote_handler = dbgp
xdebug.remote_port = 9000
xdebug.trace_output_name ='trace.%c.%H.%R'
5. Restart Apache
service httpd restart
6. set permision
# chmod 777 /var/xdebug
7. append "XDEBUG_PROFILE" to url
Test if it works – create test.php with the following code
<?php phpinfo() ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment