Re: php.ini

From: Date: Thu, 05 May 2005 11:17:14 +0000
Subject: Re: php.ini
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-16165@lists.php.net to get a copy of this message
I propose the following trivial 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;

« previous php.internals (#16165) next »