View Issue Details

IDProjectCategoryView StatusLast Update
0001948XdebugUncategorizedpublic2021-10-04 09:32
Reporterderick Assigned Toderick  
PriorityhighSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version3.0.2 
Target Version3.1devFixed in Version3.1.0 
Summary0001948: Do not redirect warning and error messages to PHP's error log if an Xdebug log is active

Keep critical errors still going to PHP's error log though.

TagsNo tags attached.
Operating System
PHP Version8.0.0-8.0.4


has duplicate 0001920 closedderick When discover_client_host is active, failure to discover shows in the main PHP error log, even when a log is specified 
has duplicate 0001975 closedderick always get "time-out connecting to debugging client" when client is not running 



2021-02-18 12:24

reporter   ~0005683

I suspect something like this in log.h would do the job in src/lib/log.c:

static inline void xdebug_php_log(int channel, int log_level, const char error_code, const char message)
if (XG_LIB(log_file) && log_level > XLOG_CRIT) {


2021-02-18 12:44

reporter   ~0005684

I created a draft PR at, I have some work to do today before I can circle back to it but I see that several existing test cases need to be updated before I set it ready to review


2021-02-19 12:21

administrator   ~0005687

That code is not right, as it would no longer redirect these messages to the PHP error log even if the xdebug log isn't configured. Also, please read and stick to the existing coding standards (NO SPACES! ;-) ).


2021-02-19 14:16

reporter   ~0005690

I hadn't realised it used spaces, that's a mistake, likely my editor trying to be clever with a new language. And I did read the contributor document, I actually tried to create a PR several times and removed them because I realised I'd made a mistake with the PR title, the commit message, etc, it was quite stressful. Have you considered an .editorconfig so that this mistake isn't possible?

Otherwise I'm unsure how to check if the log file is active, and assumed that checks used elsewhere would do it. In hindsight the check should be moved below the if statement underneath. I used that particular check based off of, that if the log_file was false then that meant there was no handle open to the logfile. Since xdebug_internal_log is called before xdebug_php_log, log_file would be available if internal logging was possible, and if it had to be intialised it would have been done beforehand


2021-04-23 15:13

administrator   ~0005861


2021-04-26 08:23

administrator   ~0005862

Issue History

Date Modified Username Field Change
2021-02-18 12:06 derick New Issue
2021-02-18 12:06 derick Status new => assigned
2021-02-18 12:06 derick Assigned To => derick
2021-02-18 12:24 tomjn Note Added: 0005683
2021-02-18 12:44 tomjn Note Added: 0005684
2021-02-19 12:21 derick Note Added: 0005687
2021-02-19 14:16 tomjn Note Added: 0005690
2021-03-17 08:30 derick Priority normal => high
2021-03-17 08:31 derick Relationship added has duplicate 0001920
2021-04-23 15:13 derick Note Added: 0005861
2021-04-26 08:23 derick Status assigned => closed
2021-04-26 08:23 derick Resolution open => fixed
2021-04-26 08:23 derick Fixed in Version => 3.1dev
2021-04-26 08:23 derick Note Added: 0005862
2021-05-19 12:19 derick Relationship added has duplicate 0001975
2021-09-05 16:15 derick Fixed in Version 3.1dev => 3.1.0beta1
2021-10-04 09:32 derick Fixed in Version 3.1.0beta1 => 3.1.0