summaryrefslogtreecommitdiff
path: root/main/php_ini.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-10-15 13:09:25 +0000
committerPierre Joye <pajoye@php.net>2009-10-15 13:09:25 +0000
commite4adfe4f61cb54c4da6e8144f82d6f6cc9d6e797 (patch)
tree21bf334bb818e51ef200e26299fc37f6e9a98cd9 /main/php_ini.c
parentef1731590af9bd85393cfd52612e3a4d92986aa2 (diff)
downloadphp-git-e4adfe4f61cb54c4da6e8144f82d6f6cc9d6e797.tar.gz
- #48779, fix another use case where / usage may differ
Diffstat (limited to 'main/php_ini.c')
-rw-r--r--main/php_ini.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/main/php_ini.c b/main/php_ini.c
index f116692a0e..6bb0185f88 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -793,10 +793,18 @@ PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC)
zval *tmp;
char *ptr;
+#if PHP_WIN32
+ char path_bak[MAXPATHLEN];
+ memcpy(path_bak, path, path_len);
+ path_bak[path_len] = 0;
+ TRANSLATE_SLASHES_LOWER(path_bak);
+ path = path_bak;
+#endif
+
/* Walk through each directory in path and apply any found per-dir-system-configuration from configuration_hash */
if (has_per_dir_config && path && path_len) {
ptr = path + 1;
- while ((ptr = strchr(ptr, DEFAULT_SLASH)) != NULL) {
+ while ((ptr = strchr(ptr, '/')) != NULL) {
*ptr = 0;
/* Search for source array matching the path from configuration_hash */
if (zend_hash_find(&configuration_hash, path, path_len, (void **) &tmp) == SUCCESS) {