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
2525 . Add property DOMXPath::$registerNodeNamespaces and constructor argument
2626 that allow global flag to configure query() or evaluate() calls.
2727
28+ - FPM:
29+ . Fixed bug #64865 (Search for .user.ini files from script dir up to
30+ CONTEXT_DOCUMENT_ROOT). (Will Bender)
31+
2832- GD:
2933 . Fixed bug #55005 (imagepolygon num_points requirement). (cmb)
3034 . 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
3713713. Changes in SAPI modules
372372========================================
373373
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+
374378========================================
3753794. Deprecated Functionality
376380========================================
Original file line number Diff line number Diff line change @@ -913,9 +913,12 @@ static int sapi_cgi_activate(void)
913913 if (fcgi_is_fastcgi ()) {
914914 fcgi_request * request = (fcgi_request * ) SG (server_context );
915915
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" );
917919 } else {
918- doc_root = getenv ("DOCUMENT_ROOT" );
920+ doc_root = getenv ("CONTEXT_DOCUMENT_ROOT" );
921+ doc_root = doc_root ? doc_root : getenv ("DOCUMENT_ROOT" );
919922 }
920923 /* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */
921924 if (doc_root ) {
Original file line number Diff line number Diff line change @@ -733,7 +733,10 @@ static int sapi_cgi_activate(void) /* {{{ */
733733
734734 /* Load and activate user ini files in path starting from DOCUMENT_ROOT */
735735 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+
737740 /* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */
738741 if (doc_root ) {
739742 doc_root_len = strlen (doc_root );
You can’t perform that action at this time.
0 commit comments