1 see also http://bugs.php.net/bug.php?id=34793
3 --- php-5.1.2/main/php_ini.c 2006-01-17 17:01:16.000000000 +0200
4 +++ php-5.1.4/main/php_ini.c 2006-06-12 11:16:06.594944020 +0300
6 } else if (!sapi_module.php_ini_ignore) {
7 char *default_location;
9 - char *binary_location;
10 static const char paths_separator[] = { ZEND_PATHS_SEPARATOR, 0 };
13 + char *binary_location;
16 env_location = getenv("PHPRC");
18 strcat(php_ini_search_path, env_location);
22 /* Add cwd (only with CLI) */
23 if (strcmp(sapi_module.name, "cli") == 0) {
24 if (*php_ini_search_path) {
28 /* Add binary directory */
30 binary_location = (char *) emalloc(MAXPATHLEN);
31 if (GetModuleFileName(0, binary_location, MAXPATHLEN) == 0) {
32 efree(binary_location);
33 binary_location = NULL;
36 - if (sapi_module.executable_location) {
37 - binary_location = (char *)emalloc(PATH_MAX);
38 - if (!realpath(sapi_module.executable_location, binary_location)) {
39 - efree(binary_location);
40 - binary_location = NULL;
43 - binary_location = NULL;
47 if (binary_location) {
48 char *separator_location = strrchr(binary_location, DEFAULT_SLASH);
53 /* Add default location */
55 default_location = (char *) emalloc(MAXPATHLEN + 1);
57 if (0 < GetWindowsDirectory(default_location, MAXPATHLEN)) {