skip to Main Content

So I just updated my PHP on Plesk from 7.4 to 8.1 and I cannot get Xdebug to Step Debug. At a loss as what I’m missing. I attached image of Xdebug settings from phpinfo. Of course 7.4 works fine but is old.

My PHP.ini is modified like so:

[XDebug]
xdebug.mode=debug
xdebug.client_host = 127.0.0.1
xdebug.client_port = 9003
xdebug.start_with_request=yes
xdebug.log="/var/log/nginx/xdebug.log"
xdebug.idekey = PHPSTORM
xdebug.discover_client_host=false

Screenshot of Xdebug section of phpinfo():
enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    Okay, figured it out. I needed to edit the '/opt/plesk/php/8.1/etc/php.d/50-xdebug.ini' file with the xdebug params. Before in PHP 7.4 all you had to do was add it to the php.ini of your site via Plesk. But in this case did not work for PHP 8.1 on FPM.


  2. You need to add the following content in the php.ini (/etc/php/8.1/fpm/php.ini) configuration file, before checking the presence of the appropriate folders:

    [xdebug]
    
    zend_extension=/usr/lib/php/20210902/xdebug.so
    xdebug.mode=debug,develop
    xdebug.client_host=127.0.0.1
    xdebug.client_port="9003"
    

    After that, you need to configure the new interpreter for version 8.1 in the development environment.

    You may also need to install the xdebug module if you haven’t installed it before.

    Changes can also be made to the file:
    /etc/php/8.1/mods-available/xdebug.ini

    That’s probably even better.

    sudo mcedit /etc/php/8.1/mods-available/xdebug.ini
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search