View Issue Details

IDProjectCategoryView StatusLast Update
0002028XdebugInstallationpublic2021-10-07 16:34
ReporterOtomatic Assigned Toderick  
PriorityurgentSeverityblockReproducibilityalways
Status resolvedResolutionduplicate 
OSWindowsOS Version10.0.19043.1266 
Product Version3.1.0 
Summary0002028: Does not works - Restart Apache
Description

xDebug 3.1.0 doesn't work with all PHP versions 7.2.34, 7.3.31, 7.4.24, 8.0.11
Apache restart in loop with the call to 'http://localhost/' for as long as the browser is trying to connect to the local site.

Steps To Reproduce

nformation: Below, the examples are given with Xdebug 3.0.4 which works correctly. It is by replacing 3.0.4 with 3.1.0 that the non-working and restarts of Apache appear.

PHP used as an Apache module in httpd.conf
PHPIniDir "${APACHE_DIR}/bin"
LoadModule php7_module "${INSTALL_DIR}/bin/php/php7.4.24/php7apache2_4.dll"

xDebug is loaded as zend_extension in php.ini:
; XDEBUG Extension
[xdebug]
zend_extension="E:/wamp64/bin/php/php7.4.24/zend_ext/php_xdebug-3.0.4-7.4-vc15-x86_64.dll"
;xdebug.mode allowed are : off develop coverage debug gcstats profile trace
xdebug.mode = develop,trace,debug
xdebug.profiler_output_name = "cachegrind.out.%t.%p"
xdebug.output_dir ="E:/wamp64/tmp/"
xdebug.show_local_vars=0
xdebug.log="E:/wamp64/logs/xdebug.log"
;xdebug.log_level : 0 Criticals, 1 Connection, 3 Warnings, 5 Communication, 7 Information, 10 Debug Breakpoint
xdebug.log_level=7
xdebug.show_error_trace=1
xdebug.show_exception_trace=1

phpinfo() =
PHP Version 7.4.24 - Apache 7.4.49
This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.24, Copyright (c), by Zend Technologies
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans

By the way, it seems strange to me that phpinfo() gives PHP 7.4.24 while xdebug_info() gives:
PHP
Build Configuration
Version 7.4.17RC1

And, despite the above configuration, the xDebug: E:/wamp64/logs/xdebug.log file is empty, even when intentionally generating PHP errors.

Additional Information

With xdebug 3.1.0 xdebug.log is
[13568] Log opened at 1970-01-01 00:32:23.587768
[13568] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[13568] [Config] INFO: Trigger value for 'XDEBUG_SESSION' not found, so not activating
[13568] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[13568] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating
[11536] Log opened at 2501-10-09 06:46:14.199882
[11536] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[11536] [Config] INFO: Trigger value for 'XDEBUG_SESSION' not found, so not activating
[11536] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[11536] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating
[14268] Log opened at 2021-10-05 07:18:21.682348
[14268] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[14268] [Config] INFO: Trigger value for 'XDEBUG_SESSION' not found, so not activating
[14268] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_TRACE'
[14268] [Config] INFO: Trigger value for 'XDEBUG_TRACE' not found, so not activating
and so on for as long as the browser is trying to connect to the local site.

TagsNo tags attached.
Operating System
PHP Version8.0.5-8.0.9

Relationships

duplicate of 0002024 closedderick Apache restarts in a loop under PHP 8.1.0 RC3 

Activities

Otomatic

2021-10-05 12:25

reporter   ~0006079

With xdebug configuration in php.ini added:
xdebug.discover_client_host=1
xdebug.start_with_request=yes

xdebug.log is:
[1008] Log opened at 2336-01-09 21:36:44.866074
[1008] [Step Debug] INFO: Checking remote connect back address.
[1008] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[1008] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[1008] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 127.0.0.1:9003.
[1008] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: localhost:9003. :-|
[1008] [Step Debug] ERR: Time-out connecting to debugging client, waited: 200 ms. Tried: 127.0.0.1:9003 (from REMOTE_ADDR HTTP header), localhost:9003 (fallback through xdebug.client_host/xdebug.client_port) :-(
[1008] Log closed at 2336-01-09 21:36:44.866074

We can also see that the date/time informations are inconsistent and wrong.
Test performed on October 5, 2021 at 1:49 pm
php_error.log is correct [05-Oct-2021 13:49:18 Europe/Paris] Xdebug: [Step Debug]...

cmb

2021-10-05 14:01

reporter   ~0006082

I can confirm this issue. If tracing is done in a ZTS environment on Windows 8.0+, xdebug_nanotime_context.win_precise_time_func is not properly initialized, and the wrong code path is taken, resulting in a division by zero, which causes the Apache worker process to be terminated. It seems to me that xdebug_nanotime_context needs to be a proper module global, which is initialized in GINIT.

derick

2021-10-07 16:34

administrator   ~0006091

Duplicate of 0002024

Issue History

Date Modified Username Field Change
2021-10-05 07:40 Otomatic New Issue
2021-10-05 12:25 Otomatic Note Added: 0006079
2021-10-05 14:01 cmb Note Added: 0006082
2021-10-07 16:34 derick Assigned To => derick
2021-10-07 16:34 derick Status new => resolved
2021-10-07 16:34 derick Resolution open => duplicate
2021-10-07 16:34 derick Note Added: 0006091
2021-10-07 16:34 derick Relationship added duplicate of 0002024