Edit report at https://bugs.php.net/bug.php?id=80881&edit=1
ID: 80881
Comment by: simbiat at outlook dot com
Reported by: simbiat at outlook dot com
Summary: open_basedir crashes Apache
Status: Feedback
Type: Bug
Package: Safe Mode/open_basedir
Operating System: Windows 10.0.19042.868]
PHP Version: 8.0.3
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Oh and my OneDrive is not in on-demand mode. I do not use this feature.
Previous Comments:
------------------------------------------------------------------------
[2021-03-18 16:55:50] simbiat at outlook dot com
I can try using Debug Diagnostic Tool, but I've used the build from Apache Lounge. Will the
debug pack from https://windows.php.net/download/
work with them?
------------------------------------------------------------------------
[2021-03-18 16:25:59] cmb@php.net
> Based on that manual, should not the full dump that was> generated by Windows for httpd.exe be enough?
Well, I'm not a big fan of downloading 2 GB crash dumps, but I
might give it a try.
> Also I'm not sure I understand what you mean by "on-demand" [â¦]
You can have your local OneDrive folder in on-demand mode, or you
can copy the files. In the former case, the OneDrive folder is a
reparse point.
> [â¦] and why it's normal for Apache to crash this way.
I don't know; I didn't say this.
------------------------------------------------------------------------
[2021-03-18 16:19:39] simbiat at outlook dot com
Based on that manual, should not the full dump that was generated by Windows for httpd.exe be
enough? It can be taken from https://1drv.ms/u/s!AsaK_C2Xv0I4gunuXIptXRyLcx8YymA?e=NmL4AA
Also I'm not sure I understand what you mean by "on-demand" and why it's normal
for Apache to crash this way. From what I understand "ondemand" is relevant for PHP-FPM,
but it's not available for Windows, from what I know. I was able to replciate the crash with
mod_php and mod_fcgi.
------------------------------------------------------------------------
[2021-03-18 12:16:24] cmb@php.net
> open_basedir = "C:/Users/simbi/OneDrive/â¦"> [â¦] if you set open_basedir it will slow PHP down and cause> Apache to crash.
Assuming you have on-demand enabled, the former is to be expected.
You're generally better off to download a copy of the Website and
work with this.
The stack backtrace would be way more helpful, if you had debug
symbols for PHP installed. You can get them from windows.php.net;
they're called "debug pack". Then generate a stack backtrace[1]
with the Debug Diagnostic Tool and make sure that the debug
symbols are loaded.
Also, it might help if you can provide the output of
fsutil reparsePoint query C:\Users\simbi\OneDrive
[1] <https://bugs.php.net/bugs-generating-backtrace-win32.php>
------------------------------------------------------------------------
[2021-03-18 11:16:59] simbiat at outlook dot com
Description:
------------
It looks like after some update for Windows (KB5000802 and/or later one) if you set open_basedir it
will slow PHP down and cause Apache to crash.
More details including text of the dump can be found here https://www.apachelounge.com/viewtopic.php?p=39993
In summary: even on latest builds of Apache both PHP 7.4.16 and 8.0.3 crash if open_basedir is set.
This is true both for mod_php and mod_fcgi (errors do differ a bit, of course). Once open_basedir is
commented out the crashes stop and PHP seems to start working much faster, too.
Considering that !analyze -v command indicates "virtual_realpath" component on the 2nd
line of the stack and open_basedir is supposed to disable realpath cache, I presume, that there is
an issue in how it is being disabled.
Test script:
---------------
Not applicable. Any script does this
Expected result:
----------------
Apache does not crash
Actual result:
--------------
Apache restarts child process
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80881&edit=1