Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save natanfelles/20370d8e2b0def7f1e485787dd81ceb4 to your computer and use it in GitHub Desktop.
Save natanfelles/20370d8e2b0def7f1e485787dd81ceb4 to your computer and use it in GitHub Desktop.
Installing xdebug for php7.1 on Ubuntu 14.04

Install xdebug extension

# Download stable release of xdebug from https://xdebug.org/download.php
wget -c "https://xdebug.org/files/xdebug-2.5.3.tgz"
# Extract archive
tar -xf xdebug-2.5.3.tgz

cd xdebug-2.5.3/

# build extension
phpize
./configure
make && make install

Enable the extension:

echo "zend_extension=xdebug.so" > /etc/php/7.1/mods-available/xdebug.ini

ln -sf /etc/php/7.1/mods-available/xdebug.ini /etc/php/7.1/fpm/conf.d/20-xdebug.ini
ln -sf /etc/php/7.1/mods-available/xdebug.ini /etc/php/7.1/cli/conf.d/20-xdebug.ini

service php7.1-fpm restart

# Check it
php -m | grep -i xdebug

# should print:
xdebug
Xdebug
@natanfelles
Copy link
Author

sudo apt install php7.1-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment