Browse Source

Fix PHPRC overriding other ini files. This is how PHPRC worked prior to

4.3.x, and is usefull for applications that execute PHP and want to
emulate CGI and define alternate INI files (ie. cannot use -c).
migration/unlabaled-1.3.2
Shane Caraveo 24 years ago
parent
commit
26296130ad
  1. 16
      main/php_ini.c

16
main/php_ini.c

@ -306,6 +306,14 @@ int php_init_config()
* Prepare search path
*/
/* Add environment location */
if (env_location[0]) {
if (*php_ini_search_path) {
strcat(php_ini_search_path, paths_separator);
}
strcat(php_ini_search_path, env_location);
}
/* Add cwd */
#ifdef INI_CHECK_CWD
if (strcmp(sapi_module.name, "cli") != 0) {
@ -343,14 +351,6 @@ int php_init_config()
efree(binary_location);
}
/* Add environment location */
if (env_location[0]) {
if (*php_ini_search_path) {
strcat(php_ini_search_path, paths_separator);
}
strcat(php_ini_search_path, env_location);
}
/* Add default location */
#ifdef PHP_WIN32
default_location = (char *) emalloc(MAXPATHLEN + 1);

Loading…
Cancel
Save