Skip to content

Instantly share code, notes, and snippets.

@windmitry
Created January 22, 2019 15:34
Show Gist options
  • Select an option

  • Save windmitry/87f95d19c7b983ed7c3437a8fc55b8cf to your computer and use it in GitHub Desktop.

Select an option

Save windmitry/87f95d19c7b983ed7c3437a8fc55b8cf to your computer and use it in GitHub Desktop.

Revisions

  1. Dmitry Vinnitsky created this gist Jan 22, 2019.
    26 changes: 26 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    # 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