Skip to content

Commit 721ca87

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Apply doc root fix for FPM
2 parents a230b5a + f62571c commit 721ca87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sapi/fpm/fpm/fpm_main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ static void sapi_cgi_log_message(char *message, int syslog_type_int)
620620

621621
/* {{{ php_cgi_ini_activate_user_config
622622
*/
623-
static void php_cgi_ini_activate_user_config(char *path, int path_len, const char *doc_root, int doc_root_len, int start)
623+
static void php_cgi_ini_activate_user_config(char *path, int path_len, const char *doc_root, int doc_root_len)
624624
{
625625
char *ptr;
626626
time_t request_time = sapi_get_request_time();
@@ -670,7 +670,7 @@ static void php_cgi_ini_activate_user_config(char *path, int path_len, const cha
670670
to find more user.ini, if not we only scan the current path.
671671
*/
672672
if (strncmp(s1, s2, s_len) == 0) {
673-
ptr = s2 + start; /* start is the point where doc_root ends! */
673+
ptr = s2 + doc_root_len;
674674
while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) {
675675
*ptr = 0;
676676
php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config);
@@ -744,7 +744,7 @@ static int sapi_cgi_activate(void) /* {{{ */
744744
--doc_root_len;
745745
}
746746

747-
php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len, doc_root_len - 1);
747+
php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len);
748748
}
749749
}
750750

0 commit comments

Comments
 (0)