|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-05-05 09:51 UTC] hgrunw at gmail dot com
Description: ------------ Problem: when using PHP4 ISAPI .dll for a virtual directory XXX and PHP5 ISAPI .dll for a virtual directory YYY in IIS, it is impossible to specify different php.ini-s for the .dll-s. PHPRC won't obviously work. Proposal: search for php.ini in the following order in PHP5: 1) PHP5RC env. variable, 2) PHPRC env. variable, 3) (other options). Alternative: find a way of using the php.ini from the ISAPI .dll load directory (seems more complicated to implement). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 11:00:01 2025 UTC |
I propose the following patches to PHP5 to resolve the problem: 1) Registry based fix: diff -Nurp win32.orig\registry.c win32\registry.c --- win32.orig\registry.c Mon Mar 14 18:12:56 2005 +++ win32\registry.c Thu May 05 13:47:40 2005 @@ -1,7 +1,7 @@ #include "php.h" #include "php_ini.h" -#define PHP_REGISTRY_KEY "SOFTWARE\\PHP" +#define PHP_REGISTRY_KEY "SOFTWARE\\PHP5" void UpdateIniFromRegistry(char *path TSRMLS_DC) { 2) PHPRC / PHP5RC env. variable diff -Nurp main.orig\php_ini.c main\php_ini.c --- main.orig\php_ini.c Fri Sep 17 08:18:48 2004 +++ main\php_ini.c Thu May 05 13:56:32 2005 @@ -290,9 +290,11 @@ int php_init_config() safe_mode_state = PG(safe_mode); open_basedir = PG(open_basedir); - env_location = getenv("PHPRC"); + env_location = getenv("PHP5RC"); if (!env_location) { - env_location = ""; + env_location = getenv("PHPRC"); + if (!env_location) + env_location = ""; } if (sapi_module.php_ini_path_override) { php_ini_search_path = sapi_module.php_ini_path_override; They both could be incorporated?