File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ PHP NEWS
25
25
. Add property DOMXPath::$registerNodeNamespaces and constructor argument
26
26
that allow global flag to configure query() or evaluate() calls.
27
27
28
+ - FPM:
29
+ . Fixed bug #64865 (Search for .user.ini files from script dir up to
30
+ CONTEXT_DOCUMENT_ROOT). (Will Bender)
31
+
28
32
- GD:
29
33
. Fixed bug #55005 (imagepolygon num_points requirement). (cmb)
30
34
. Replaced gd resources with objects. (Mark Randall)
Original file line number Diff line number Diff line change @@ -371,6 +371,10 @@ PHP 8.0 UPGRADE NOTES
371
371
3. Changes in SAPI modules
372
372
========================================
373
373
374
+ - CGI and FPM will now use CONTEXT_DOCUMENT_ROOT to scan for .user.ini files,
375
+ if it is defined. Otherwise, DOCUMENT_ROOT will be used as before. This
376
+ improves support for Apache mod_userdir and mod_alias.
377
+
374
378
========================================
375
379
4. Deprecated Functionality
376
380
========================================
Original file line number Diff line number Diff line change @@ -913,9 +913,12 @@ static int sapi_cgi_activate(void)
913
913
if (fcgi_is_fastcgi ()) {
914
914
fcgi_request * request = (fcgi_request * ) SG (server_context );
915
915
916
- doc_root = FCGI_GETENV (request , "DOCUMENT_ROOT" );
916
+ /* Prefer CONTEXT_DOCUMENT_ROOT if set */
917
+ doc_root = FCGI_GETENV (request , "CONTEXT_DOCUMENT_ROOT" );
918
+ doc_root = doc_root ? doc_root : FCGI_GETENV (request , "DOCUMENT_ROOT" );
917
919
} else {
918
- doc_root = getenv ("DOCUMENT_ROOT" );
920
+ doc_root = getenv ("CONTEXT_DOCUMENT_ROOT" );
921
+ doc_root = doc_root ? doc_root : getenv ("DOCUMENT_ROOT" );
919
922
}
920
923
/* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */
921
924
if (doc_root ) {
Original file line number Diff line number Diff line change @@ -733,7 +733,10 @@ static int sapi_cgi_activate(void) /* {{{ */
733
733
734
734
/* Load and activate user ini files in path starting from DOCUMENT_ROOT */
735
735
if (PG (user_ini_filename ) && * PG (user_ini_filename )) {
736
- doc_root = FCGI_GETENV (request , "DOCUMENT_ROOT" );
736
+ /* Prefer CONTEXT_DOCUMENT_ROOT if set */
737
+ doc_root = FCGI_GETENV (request , "CONTEXT_DOCUMENT_ROOT" );
738
+ doc_root = doc_root ? doc_root : FCGI_GETENV (request , "DOCUMENT_ROOT" );
739
+
737
740
/* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */
738
741
if (doc_root ) {
739
742
doc_root_len = strlen (doc_root );
You can’t perform that action at this time.
0 commit comments