Skip to content

Commit ae5d7e4

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Apply doc root fix for FPM
2 parents 9955230 + 721ca87 commit ae5d7e4

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
@@ -614,7 +614,7 @@ static void sapi_cgi_log_message(char *message, int syslog_type_int)
614614

615615
/* {{{ php_cgi_ini_activate_user_config
616616
*/
617-
static void php_cgi_ini_activate_user_config(char *path, int path_len, const char *doc_root, int doc_root_len, int start)
617+
static void php_cgi_ini_activate_user_config(char *path, int path_len, const char *doc_root, int doc_root_len)
618618
{
619619
char *ptr;
620620
time_t request_time = sapi_get_request_time();
@@ -664,7 +664,7 @@ static void php_cgi_ini_activate_user_config(char *path, int path_len, const cha
664664
to find more user.ini, if not we only scan the current path.
665665
*/
666666
if (strncmp(s1, s2, s_len) == 0) {
667-
ptr = s2 + start; /* start is the point where doc_root ends! */
667+
ptr = s2 + doc_root_len;
668668
while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) {
669669
*ptr = 0;
670670
php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config);
@@ -741,7 +741,7 @@ static int sapi_cgi_activate(void) /* {{{ */
741741
--doc_root_len;
742742
}
743743

744-
php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len, doc_root_len - 1);
744+
php_cgi_ini_activate_user_config(path, path_len, doc_root, doc_root_len);
745745
}
746746
}
747747

0 commit comments

Comments
 (0)