1

I currently installed php7.0 version of phpize, and xdebug does not work, wondering if there is a phpize for php7.1.1?

Dumb Question
  • 221
  • 1
  • 4
  • 8

1 Answers1

0

To install xdebug for php7.1. Follow these steps to install for php7.1:

  1. Install php7.1 dev, if there go to step 2:

    sudo apt install php-all-dev
    
  2. Install the xdebug module:

    sudo apt install php-xdebug
    
  3. Retstart apache with:

    sudo systemctl restart apache2
    
  4. To test it:

    a. Go to the page you added to your OP and add the contents of your phpinfo() command to get the relevant xdebug-2.5.1.tgz file

    b. Follow the steps as directed on that page:

    1. tar -xvzf xdebug-2.5.1.tgz

    2. cd xdebug-2.5.1/

    3. now run phpize7.1, not phpize as given on that page

      • You should see this output, or something similar

        Configuring for:
        ...
        Zend Module Api No:      20151012
        Zend Extension Api No:   320151012
        
  5. Add the following to the /etc/php/7.1/mods-available/xdebug.ini under any entry you see there:

    xdebug.show_error_trace = 1
    
  6. Restart apache: sudo systemctl restart apache2

  7. Check your phpinfo() output on a webpage you should see the xdebug section now.

George Udosen
  • 35,970
  • 13
  • 99
  • 121