View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002145 | Xdebug | Uncategorized | public | 2022-12-11 21:11 | 2023-03-21 19:35 |
Reporter | MaxArhipov | Assigned To | derick | ||
Priority | high | Severity | block | Reproducibility | always |
Status | resolved | Resolution | duplicate | ||
Product Version | 3.2.0 | ||||
Fixed in Version | 3.2.1 | ||||
Summary | 0002145: Xdebug 3.2.0 crash PHP on Windows if xdebug.mode = off | ||||
Description | Xdebug 3.2.0 crash PHP on Windows if xdebug.mode = off | ||||
Steps To Reproduce | Install Xdebug 3.2.0 with any PHP version you like (tried with 8.0.x) on Windows. | ||||
Additional Information | Minimal Xdebug configuration in php.ini to reproduce: [XDebug] | ||||
Tags | No tags attached. | ||||
Operating System | Windows 10 Pro 22H2 | ||||
PHP Version | 8.0.20-8.0.29 | ||||
|
Hi, I can obviously not reproduce this on Linux — but can you let me know more about your setup? Using Apache, or IIS, or something else? Can you also reproduce this with the built-in webserver of PHP? You can run that like the following (although you might need to set paths):
Then request a file in the directory where you called this from, by going to http://localhost:9242/filename.php in the browser. cheers, |
|
With command php -n -d xdebug.mode=debug -d zend_extension=xdebug -S localhost:9242 it works. But problem with Apache (mod_php) and mode OFF (NOT DEVELOP). Test config: PHP 8.2.0, PHP 8.1.12, PHP 8.0.25 (minimal config) + Xdebug 3.2.0+ Apache 2.4.54 (minimal config) + Windows 10 Pro 22H2 PHP.ini (this is the entire text of the file): [PHP] extension_dir = "C:/Users/User/PHP/ext" [xdebug] xdebug.mode = off |
|
The main Apache process remains in the process list, but the child process crashes with every request and constant automatic restart. The Apache child process in Windows is the main PHP workflow, because only one Apache child process is allowed in Windows with mpm_winnt_module. When I remove: "zend_extension = xdebug" Xdebug 3.1.6 does not have such problems. |
|
I investigated the problem deeper, step-by-step executed the code of the popular Adminer script, and I found out that PHP+XDebug crashes from the following line of code: The problem occurs in Windows when using Apache with PHP+Xdebug, provided that xdebug.mode = off In a normal situation PHP should not crash and should output the following error: Since the problem is still not solved, I assumed that it is difficult for you to reproduce this on windows yourself. I have prepared a test bench for you: https://files.ospanel.io/XDebugTest.zip , unpack the XDebugTest folder to the root of C: and run C:\XDebugTest\Start_Apache_Server.bat If it does not start, then you need to install libraries from Microsoft: After the server is successfully started, run http://127.0.8.1/ and you will see that the Apache child process (mod_php) constantly crashes with every http request. If you disable the Xdebug extension in the PHP config and restart the server, then everything works fine. Windows event log: |
|
PHP + Xdebug 3.2.0 also crashes from the following line of code: <?php in php.ini: [xdebug] |
|
I believe this is a duplicate of 0002144, for which I have just merged a fix. A 3.2.1 release with that fix will follow in the next hour for you to test with. |
|
The new version works stably. Thanks! |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-12-11 21:11 | MaxArhipov | New Issue | |
2022-12-12 09:42 | derick | Assigned To | => derick |
2022-12-12 09:42 | derick | Status | new => feedback |
2022-12-12 09:42 | derick | Note Added: 0006475 | |
2022-12-12 22:51 | MaxArhipov | Note Added: 0006480 | |
2022-12-12 22:51 | MaxArhipov | Status | feedback => assigned |
2022-12-13 00:27 | MaxArhipov | Note Added: 0006481 | |
2023-02-02 01:04 | MaxArhipov | Note Added: 0006511 | |
2023-02-02 01:14 | MaxArhipov | Note Added: 0006512 | |
2023-03-21 16:32 | derick | Status | assigned => resolved |
2023-03-21 16:32 | derick | Resolution | open => duplicate |
2023-03-21 16:32 | derick | Fixed in Version | => 3.2.1 |
2023-03-21 16:32 | derick | Note Added: 0006536 | |
2023-03-21 16:32 | derick | Relationship added | duplicate of 0002144 |
2023-03-21 19:35 | MaxArhipov | Note Added: 0006538 |