summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--sapi/cgi/cgi_main.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 505451e470..af9ac57ff2 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ PHP NEWS
- Core:
. Fixed bug #79566 (Private SHM is not private on Windows). (cmb)
+ . Fixed bug #79489 (.user.ini does not inherit). (cmb)
- Opcache:
. Fixed bug #79535 (PHP crashes with specific opcache.optimization_level).
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 8c8e1463d5..37f8eac6e0 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -843,7 +843,11 @@ static void php_cgi_ini_activate_user_config(char *path, size_t path_len, const
if (strncmp(s1, s2, s_len) == 0) {
#endif
char *ptr = s2 + doc_root_len;
+#ifdef PHP_WIN32
+ while ((ptr = strpbrk(ptr, "\\/")) != NULL) {
+#else
while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) {
+#endif
*ptr = 0;
php_parse_user_ini_file(path, PG(user_ini_filename), entry->user_config);
*ptr = '/';