How to Stop the XDebug Message - "The setting 'xdebug...' has been renamed, see the upgrading guide"

I am using php7.4

So although i set my php.ini to include the changes it wants i still get the following errors ONLY when i debug within phpstorm...i do not get these errors when i run my script outside PHPStorm:

[12-Mar-2021 04:08:20 America/Toronto] Xdebug: [Config] The setting 'xdebug.remote_enable' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_enable (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[12-Mar-2021 04:08:20 America/Toronto] Xdebug: [Config] The setting 'xdebug.remote_host' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_host (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[12-Mar-2021 04:08:20 America/Toronto] Xdebug: [Config] The setting 'xdebug.remote_mode' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_mode (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[12-Mar-2021 04:08:20 America/Toronto] Xdebug: [Config] The setting 'xdebug.remote_port' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_port (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)

I have already set my php.ini with the following changes that the errors say to do.  Here is my php.ini:

xdebug.mode=debug
xdebug.client_port="9000"
xdebug.client_host="127.0.0.1"

I get a sense there is an area in phpstorm that is using the old xdebug commands.  Is there a way to fix this?

I am using PHPStorm 2019.

15 comments
Comment actions Permalink

Hi there,

I am using PHPStorm 2019.

That's the problem.

Xdebug v3 is supported from 2020.3 version only. Older versions do not know anything about new params and will keep sending Xdebug v2 style parameters when using Debug.

You have 2 options:

  1. Upgrade to 2020.3
  2. Disable IDE from sending such additional params for CLI debug and rely only on what you have in your Xdebug config / php.ini. Will be more difficult to debug CLI scripts this way (as IDE will not send "debug me" flag).
    In 2020.3 it is located at "Settings/Preferences | Languages & Frameworks | PHP | Debug | Pass required configuration options through command line"
1
Comment actions Permalink

Ahhhhh thank you!  This answers it clearly!

0
Comment actions Permalink

Another option (which just hides those messages from the output): Xdebug 3 writes such messages using PHP's standard error logging. If it's not propely configured then it outputs it to your stdout (your screen).

If you configure error_log in your php.ini then PHP will write such messages into the log file instead of your screen.

https://stackoverflow.com/a/65264131/783119

1
Comment actions Permalink

So i upgraded to PHPStorm 2020.3.2 (via a fresh install) but i am still getting the same errors:

[13-Mar-2021 07:25:36 America/Toronto] Xdebug: [Config] The setting 'xdebug.remote_enable' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_enable (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[13-Mar-2021 07:25:36 America/Toronto] Xdebug: [Config] The setting 'xdebug.remote_host' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_host (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[13-Mar-2021 07:25:36 America/Toronto] Xdebug: [Config] The setting 'xdebug.remote_mode' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_mode (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
[13-Mar-2021 07:25:36 America/Toronto] Xdebug: [Config] The setting 'xdebug.remote_port' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_port (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)

 

My php.ini has:

xdebug.mode=debug
xdebug.client_port="9000"

 

I prefer not to disable IDE from sending such additional params for CLI debug :(

 

Via php -v:

PHP 7.4.16 (cli) (built: Mar 2 2021 14:06:13) ( NTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v3.0.3, Copyright (c) 2002-2021, by Derick Rethans
with Zend OPcache v7.4.16, Copyright (c), by Zend Technologies

0
Comment actions Permalink

1. So to double check: this is happening with a CLI debug, right? Or that for a web page debug etc?

2. What the actual command is in the Console tab of the debugger? Do you see those v2 params there? I do not see them.

3. Check what Xdebug version is detected for your current PHP Interpreter? Maybe you have not refreshed it and it still sees v2 there?

4. If all good there, then it must be your php.ini (maybe not the php.ini file itself but one of the included config files specific for Xdebug).

Check/show what php --ini output shows (can also be seen in the top most table of the phpinfo(); / php -i output).

1
Comment actions Permalink

Hi again Andriy.....Very much appreciated you are here to help....for your questioons:

1. CLI Debug..correct

2. And ahh here is the problem indeed..here is my actual command in the console tab: "C:\Program Files\PhpStorm 2020.3.2\php\php.exe" -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 -dxdebug.mode=debug -dxdebug.client_port=9000 -dxdebug.client_host=127.0.0.1 "D:\PHP Projects\test.php"

 

Note how it includes the new settings at the end of the command but the start of it still has the old commands.  In my php.ini i gave the new settings...strangely i didnt't write xdebug.client_host=127.0.0.1 in my php.ini but i see it in the console already given..  There is no mention of those old commands in my php.ini

From what i can tell after playing it appears to be ignoring whatever i set in my php.ini ...for example, just now i cahanged my xdebug.client_port in php.ini to 9003 instead of 9000 and the console still shows 9000....even the Settings | PHP | Debug | XDebug - Debug Port remains as 9000 instead of changing to reflect what is in php.ini ;(

 

0
Comment actions Permalink

UPDATE: Ok it appears i solved it by removing the following line from my php.ini:

zend_extension="C:\Program Files\PhpStorm 2020.3.2\php\php_xdebug-3.0.3-7.4-vc15-nts-x86_64.dll"

(i also removed the xdebug.mode=debug and xdebug.client_port=9000" lines too but they were being ignore anyway)

I then added that full file path (to xdebug-3.0.3) into the Debugger extension field (see image above).  I didn't have to add the xdebug.mode=debug and xdebug.client_port=9000 options to the "Configuration Options" field because when i did i noticed the Command repeated them.

No clue why my php.ini is being ignored by PHPStorm and it only fixes/removes the error messages only when i use the Debugger extensions field within PHPStorm but hey at least it works now.

0
Comment actions Permalink

One peculiar last thing i see tho is when i enter this area (last pic) php generates an erorr_log line that says:

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

It also does it again when i hit the "Refresh" icon (that icon on the far right of "PHP executable".  Any ideas why it does that?  Any way to surpress that?

 

0
Comment actions Permalink

Any ideas why it does that?

You must still have an old option somewhere. Double check #4 from my last comment. Also check your ENV variable content.

The 2020.3.2 version seems to work fine for me -- no such entries on either screen or PHP's error log.

Also try creating new Run/Debug Configuration.

1
Comment actions Permalink

Much appreciated again for the quick reply.    Just in case, i am no longer getting the constant xdebug error_log messages.  Currently, i only get the "Xdebug: [Config] The setting 'xdebug.remote_enable' has been renamed.." line only when i go into the "CLI Interpreters" dialog.  The moment the dialog appears it creates that single entry.  This only was able to occur when i added tht entry i mentioned in my last reply.  If i remove that line the errors all return.  So as u said there is something, somewhere.

And to answer your questions:

1. I rechecked php --ini and here is the result (seems fine):

2. I am using Windows and my ENV variables and checked all of them and i dont see any XDebug entries.  The PHPStorm lines do not include any options (nor mention xdebug on the line).  I do see the line '%PHPStorm%' and a line to \php (to run the php.exe or whatever that exists in that dir from command line)

3. I created a new Run/Debug Configuration and the error still shows up (assuming i return to the CLI Interpreters dialog window).

4. I created a new project and the error still shows.

5. For the fun of it here is the xdebug section when i do phpinfo()

xdebug

__ __ _ _
\ \ / / | | | |
\ V / __| | ___| |__ _ _ __ _
> < / _` |/ _ \ '_ \| | | |/ _` |
/ . \ (_| | __/ |_) | |_| | (_| |
/_/ \_\__,_|\___|_.__/ \__,_|\__, |
__/ |
|___/

Version => 3.0.3
Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support

Enabled Features<br/>(through 'xdebug.mode' setting)
Feature => Enabled/Disabled
Development Aids => ✘ disabled
Coverage => ✘ disabled
GC Stats => ✘ disabled
Profiler => ✘ disabled
Step Debugger => ✔ enabled
Tracing => ✘ disabled

Debugger => enabled
IDE Key => 12494

Directive => Local Value => Master Value
xdebug.auto_trace => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.cli_color => 0 => 0
xdebug.client_discovery_header => no value => no value
xdebug.client_host => 127.0.0.1 => 127.0.0.1
xdebug.client_port => 9003 => 9003
xdebug.cloud_id => no value => no value
xdebug.collect_assignments => Off => Off
xdebug.collect_includes => (setting removed in Xdebug 3) => (setting removed in Xdebug 3)
xdebug.collect_params => (setting removed in Xdebug 3) => (setting removed in Xdebug 3)
xdebug.collect_return => Off => Off
xdebug.collect_vars => (setting removed in Xdebug 3) => (setting removed in Xdebug 3)
xdebug.connect_timeout_ms => 200 => 200
xdebug.coverage_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.default_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.discover_client_host => Off => Off
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.file_link_format => no value => no value
xdebug.filename_format => no value => no value
xdebug.force_display_errors => Off => Off
xdebug.force_error_reporting => 0 => 0
xdebug.gc_stats_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.gc_stats_output_dir => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p
xdebug.halt_level => 0 => 0
xdebug.idekey => no value => no value
xdebug.log => no value => no value
xdebug.log_level => 7 => 7
xdebug.max_nesting_level => 256 => 256
xdebug.max_stack_frames => -1 => -1
xdebug.mode => debug => debug
xdebug.output_dir => C:\Windows\Temp => C:\Windows\Temp
xdebug.overload_var_dump => (setting removed in Xdebug 3) => (setting removed in Xdebug 3)
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.profiler_enable_trigger => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.profiler_enable_trigger_value => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.profiler_output_dir => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_autostart => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_connect_back => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_enable => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_host => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_log => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_log_level => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_mode => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_port => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.remote_timeout => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.scream => Off => Off
xdebug.show_error_trace => Off => Off
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => (setting removed in Xdebug 3) => (setting removed in Xdebug 3)
xdebug.start_upon_error => default => default
xdebug.start_with_request => default => default
xdebug.trace_enable_trigger => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.trace_enable_trigger_value => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir => (setting renamed in Xdebug 3) => (setting renamed in Xdebug 3)
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.trigger_value => no value => no value
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3


Wellp, if this is all i have to deal with (one stray error message when i go into CLI Interpreters dialog) then that is fine.  The other errors was the biggest problem which seems solved when i did what i said in my last reply.  No clue why it works.

My PHPStorm 2020.3 was a fresh install.  Later i will create a VM of Windows 10 and install PHPStorm 2020.3 there to see if it is some bug on Windows systems or something cuz i am at a loss.

 

0
Comment actions Permalink

From what i can tell after playing it appears to be ignoring whatever i set in my php.ini ...for example, just now i cahanged my xdebug.client_port in php.ini to 9003 instead of 9000 and the console still shows 9000....even the Settings | PHP | Debug | XDebug - Debug Port remains as 9000 instead of changing to reflect what is in php.ini ;(

IDE does not react to / checks what you have in your php.ini

The port number has to be set manually.

No clue why my php.ini is being ignored by PHPStorm and it only fixes/removes the error messages only when i use the Debugger extensions field within PHPStorm but hey at least it works now.

No idea. Most likely -- some cached info where it still remembers about v2.

Please share your php.ini (upload it somewhere and share a link).

Please also share the output of your phpinfo() -- captured in the same way you are trying to debug (CLI). Same: upload and share the link.

1
Comment actions Permalink

Here you go: https://mega.nz/folder/XwpQGBKb#2c4AxFUrFdDK03ZaVbY43w
Has my php.ini and the phpinfo.txt (output from phpinfo() )

Btw, i also tried File | Invalidate Caches / Restart.. no luck

0
Comment actions Permalink

Thanks. Sadly nothing unusual there.

This unlikely to bring anything, but check for completeness:

  • any .user.ini files?
  • maybe it's somewhere in your actual PHP code? There were a few cases where "Xdebug does not work as intended" when Xdebug params where set during runtime in the actual PHP code in a project (for some reason the prev devs of that project had it there). But then -- this would not affect the PHP Interpreter on that screen...

I'm out of ideas. Last one: try enabling extra logging and see if it will bring anything for that param there:

1
Comment actions Permalink

Just an update: Fixed it :)

Although this may seem strange it seems it was an issue with error_reporting line in php.ini.  Apparently by not having ~E_DEPRECATED on my error_reporting PHP assumed to not only give me warnings but went ahead and also INCLUDED those deprecated xdebug options in the actual call to xdebug.  Huh?

So in my php.ini i only had it as:

error_reporting = E_ALL

But when i added ~E_DEPRECATED to exclude deprecated errors like this:

error_reporting = E_ALL & ~E_DEPRECATED

Then when i turn on:

zend_extension="C:\Program Files\PhpStorm 2020.3.2\php\php_xdebug-3.0.3-7.4-vc15-nts-x86_64.dll"

Then it now shows this correct xdebug line when i run my program:

"C:\Program Files\PhpStorm 2020.3.2\php\php.exe" -dxdebug.mode=debug -dxdebug.client_port=9003 -dxdebug.client_host=127.0.0.1 "D:\PHP Projects\test.php"

Recall before it would show the deprecated options along with the new ones all on one line.  No error_log is created.  Also the CLI Interpreter field can now be left blank.

So its now working great! Yay!

Once again thanks so much for all your help Andriy.  Not sure how to close this ticket but i've Upvoted all your posts.  Thanks again and have a great day!

 

0
Comment actions Permalink

After reading the comment by Koolgirlkimmy, I went off the check the CLI Interpreters dialog. 

My situation: 

I had just installed the xdebug dll on my Windows 10 box.   I was getting four error messages for formerly valid xdebug.remote.... settings.  I had nothing in my php.ini but the xend_extension line. 

The CLI Interpreters dialog is reached by:

  • ctrl-alt-S to get to settings
  • click PHP
  • See the CLI Interpreter field that should be set to the correct PHP. 
  • Click the ... button to the right of the CLI Interpreter field. 

Now see the CLI Interpreters dialog which is obscured by a modal that says "Checking PHP Installation".   When that cleared, my Debugger field CHANGED from unknown (or similar) to "Xdebug 3.0.4".  

After that I stopped getting errors regarding old xdebug.remote settings.  

Hardest part was finding where all this was, so I am documenting it here.

Good luck and good programming, all.

0

Please sign in to leave a comment.