Skip to content

Instantly share code, notes, and snippets.

@josephx86
Forked from joseluisq/xdebug_installation.md
Last active September 1, 2018 01:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josephx86/85c1413b25ee257e0543032aadfec7fc to your computer and use it in GitHub Desktop.
Save josephx86/85c1413b25ee257e0543032aadfec7fc to your computer and use it in GitHub Desktop.
Install PHP Xdebug on Fedora / CentOS x64

PHP Xdebug installation on Fedora/CentOS x64

First, install xdebug package on system:

$ sudo yum install php-pecl-xdebug.x86_64

Or with DNF:

$ sudo dnf install php-xdebug

Open and edit the php.ini file:

$ sudo vim /etc/php.ini

Add the following 2 lines to the end of the file:

zend_extension="/usr/lib64/php/modules/xdebug.so"`
xdebug.remote_enable = 1

The value for zend_extension will the directory in which xdebug.so is installed in. To check the directory, run:

$ updatedb && locate xdebug.so

Finally, if your have an Nginx server, we should restart the PHP processor php-fpm:

$ sudo systemctl restart php-fpm

Or if you have a Apache server, we should restart the httpd server:

$ sudo systemctl restart httpd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment