Skip to content

Instantly share code, notes, and snippets.

@joseluisq
Last active March 4, 2025 07:27
Show Gist options
  • Select an option

  • Save joseluisq/5a62fc629cbc2b93f89b9a3b6c2f4913 to your computer and use it in GitHub Desktop.

Select an option

Save joseluisq/5a62fc629cbc2b93f89b9a3b6c2f4913 to your computer and use it in GitHub Desktop.

Revisions

  1. joseluisq revised this gist Feb 2, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -22,6 +22,7 @@ xdebug.remote_enable=on
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=9000
    xdebug.remote_handler=dbgp
    xdebug.cli_color = 2
    ```

    3.- Verify if the extension is loaded:
  2. joseluisq revised this gist Nov 5, 2017. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -17,11 +17,11 @@ sudo emacs /etc/php/conf.d/xdebug.ini
    add `xdebug.so` lines as follow:

    ```diff
    + zend_extension=xdebug.so
    + xdebug.remote_enable=on
    + xdebug.remote_host=127.0.0.1
    + xdebug.remote_port=9000
    + xdebug.remote_handler=dbgp
    zend_extension=xdebug.so
    xdebug.remote_enable=on
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=9000
    xdebug.remote_handler=dbgp
    ```

    3.- Verify if the extension is loaded:
  3. joseluisq revised this gist Nov 5, 2017. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -8,22 +8,20 @@ _"Normally", these instructions should be also valid (in similar way) for other
    sudo pacman -Sy xdebug
    ```

    2.- Edit `php.ini` file and add `xdebug` as Zend extension:
    2.- Add or edit `xdebug.ini` file and add `xdebug` as Zend extension:

    ```sh
    sudo emacs /etc/php/php.ini
    sudo emacs /etc/php/conf.d/xdebug.ini
    ```

    add `xdebug.so` lines as follow:

    ```diff
    ; other extensions...
    extension=xmlrpc.so
    extension=xsl.so
    extension=zip.so
    +
    + ; Xdebug extension
    + zend_extension=xdebug.so
    + xdebug.remote_enable=on
    + xdebug.remote_host=127.0.0.1
    + xdebug.remote_port=9000
    + xdebug.remote_handler=dbgp
    ```

    3.- Verify if the extension is loaded:
    @@ -34,3 +32,5 @@ php -r "var_dump(extension_loaded('xdebug'));"
    Command line code:1:
    bool(true)
    ```

    Source: https://wiki.archlinux.org/index.php/PHP#XDebug
  4. joseluisq created this gist Nov 5, 2017.
    36 changes: 36 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    # Install PHP 7 Xdebug in Arch Linux

    _"Normally", these instructions should be also valid (in similar way) for other Linux distros._

    1.- Install Xdebug using pacman:

    ```sh
    sudo pacman -Sy xdebug
    ```

    2.- Edit `php.ini` file and add `xdebug` as Zend extension:

    ```sh
    sudo emacs /etc/php/php.ini
    ```

    add `xdebug.so` lines as follow:

    ```diff
    ; other extensions...
    extension=xmlrpc.so
    extension=xsl.so
    extension=zip.so
    +
    + ; Xdebug extension
    + zend_extension=xdebug.so
    ```

    3.- Verify if the extension is loaded:

    ```sh
    php -r "var_dump(extension_loaded('xdebug'));"

    Command line code:1:
    bool(true)
    ```