|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-07-06 06:26 UTC] ct at swin dot edu dot au
Description: ------------ A php.ini file with directives in a PATH section do not get applied for subdirectories in the defined path. For example [PATH=/vhost/www.example.com/dir1] will work for scripts in /vhost/www.example.com/dir1, but not /vhost/www.example.com/dir1/dir2. I have fixed this on my system using the following patch http://pastebin.com/m7e79576f PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
--- php_ini.c-orig 2009-07-06 16:04:43.000000000 +1000 +++ php_ini.c 2009-07-06 15:58:32.000000000 +1000 -795,7 +795,7 @@ while ((ptr = strchr(ptr, DEFAULT_SLASH)) != 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) { + if (zend_hash_find(&configuration_hash, path, strlen(path) + 1, (void **) &tmp) == SUCCESS) { php_ini_activate_config(Z_ARRVAL_P(tmp), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE TSRMLS_CC); } *ptr = '/';