Skip to content

Commit dbfa6aa

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Revert "Fix bug #64865: Use CONTEXT_DOCUMENT_ROOT for scanning dir tree"
2 parents ec82c20 + c97da0f commit dbfa6aa

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

sapi/cgi/cgi_main.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -914,12 +914,9 @@ static int sapi_cgi_activate(void)
914914
if (fcgi_is_fastcgi()) {
915915
fcgi_request *request = (fcgi_request*) SG(server_context);
916916

917-
/* Prefer CONTEXT_DOCUMENT_ROOT if set */
918-
doc_root = FCGI_GETENV(request, "CONTEXT_DOCUMENT_ROOT");
919-
doc_root = doc_root ? doc_root : FCGI_GETENV(request, "DOCUMENT_ROOT");
917+
doc_root = FCGI_GETENV(request, "DOCUMENT_ROOT");
920918
} else {
921-
doc_root = getenv("CONTEXT_DOCUMENT_ROOT");
922-
doc_root = doc_root ? doc_root : getenv("DOCUMENT_ROOT");
919+
doc_root = getenv("DOCUMENT_ROOT");
923920
}
924921
/* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */
925922
if (doc_root) {

sapi/fpm/fpm/fpm_main.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -729,10 +729,7 @@ static int sapi_cgi_activate(void) /* {{{ */
729729

730730
/* Load and activate user ini files in path starting from DOCUMENT_ROOT */
731731
if (PG(user_ini_filename) && *PG(user_ini_filename)) {
732-
/* Prefer CONTEXT_DOCUMENT_ROOT if set */
733-
doc_root = FCGI_GETENV(request, "CONTEXT_DOCUMENT_ROOT");
734-
doc_root = doc_root ? doc_root : FCGI_GETENV(request, "DOCUMENT_ROOT");
735-
732+
doc_root = FCGI_GETENV(request, "DOCUMENT_ROOT");
736733
/* DOCUMENT_ROOT should also be defined at this stage..but better check it anyway */
737734
if (doc_root) {
738735
doc_root_len = strlen(doc_root);

0 commit comments

Comments
 (0)