1

After upgrading to Xdebug 3 on Ubuntu I see following error message in console after each script execution from command line:

Xdebug: [Config] The setting 'xdebug.collect_params' has been removed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.collect_params (See: https://xdebug.org/docs/errors#CFG-C-REMOVED)

I haven't this setting anywhere in php.ini or xdebug.ini files

PHP verison:

PHP 8.0.0 (cli) (built: Nov 27 2020 12:26:05) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies with Zend OPcache v8.0.0, Copyright (c), by Zend Technologies with Xdebug v3.0.1, Copyright (c) 2002-2020, by Derick Rethans

Issue also can be reproduced on php 7.4 and on by other devs

  • 1
    Did you double check which php.ini file the CLI was using `>php --ini` – RiggsFolly Jan 07 '21 at 12:43
  • Hi @RiggsFolly Yes, it used /etc/php/8.0/cli/php.ini and /etc/php/8.0/cli/conf.d/20-xdebug.ini without this config. Also 2 devs in my team have same issue – Vladimir Cherepinskiy Jan 07 '21 at 14:07
  • @VladimirCherepinskiy 1) Please check (grep) ALL PHP related config files (`/etc/php/*/*.ini`) 2) Check your ENV as well (as some Xdebug setting may be passed this way as well) -- could be your bash/whatever profile as well. 3) Do you use any IDE/Editor? Maybe it is the one that adds them when you clicking "Debug". – LazyOne Jan 07 '21 at 15:15
  • Thanks for suggestions @LazyOne 1) Checked, nothing found 2) Same, nothing for XDEBUG 3) I use PHPStorm but can see same error even when Xdebug disabled in Storm configs or when launch CLI task from Ubuntu terminal. Can't imagine how IDE can add something to xdebug in this case – Vladimir Cherepinskiy Jan 07 '21 at 15:34
  • Well .. it takes it from somewhere. IDE was mentioned because currently PhpStorm adds both v2 and v3 params (it will be improved in next version). But since you see the same when launched in plain console ... obviously, IDE will not be the one causing it. If you create some test .php file in a completely different folder (not where you have your PHP/websites) -- will it still behave the same? I'm thinking, maybe it's `.user.ini` or alike file (where you can override on per location). – LazyOne Jan 07 '21 at 15:59
  • 1
    If it's not in .ini file, nothing Xdebug related in your ENV, not .user.ini., not your shell profile/startup file ... then I personally don't know other places to look for. I may only suggest to `grep` through ALL files on your system looking for that offending `collect_params` entry as well as `xdebug.` (with dot at the end -- to see all places) – LazyOne Jan 07 '21 at 16:03
  • @VladimirCherepinskiy Did you managed to find where it comes from? I'm interested to know that myself. – LazyOne Jan 08 '21 at 11:45
  • Hey @LazyOne Just found ini_set('xdebug.collect_params', 3); in core file of my outdated framework. I noticed that issue not present on Symfony projects and used `grep` by php files Thanks for the tip! – Vladimir Cherepinskiy Jan 08 '21 at 12:08
  • 1
    @VladimirCherepinskiy Great. I now remember that I've seen similar situation or two in the past (quite few years ago though ... in one of the PhpStorm forum threads) so did not really think to suggest something like that (as it's simply wrong to have such values there). **Please post your solution as an answer** (you can accept your own answers) -- this will help other users in similar situation and having proper accepted answer will make it much more visible. – LazyOne Jan 08 '21 at 12:27

1 Answers1

4

I've found ini_set('xdebug.collect_params', 3) in core file of outdated Kohana framework that used on my project.

I removed this default setting from code