]>
Commit | Line | Data |
---|---|---|
44606c9b | 1 | see also http://bugs.php.net/bug.php?id=34793 |
2 | --- php-5.1.2/main/php_ini.c~ 2006-01-12 23:46:12.000000000 +0200 | |
3 | +++ php-5.1.2/main/php_ini.c 2006-01-17 17:01:16.000000000 +0200 | |
4 | @@ -330,6 +330,7 @@ | |
5 | strcat(php_ini_search_path, env_location); | |
6 | } | |
7 | ||
8 | +#ifdef PHP_WIN32 | |
9 | /* Add cwd (only with CLI) */ | |
10 | if (strcmp(sapi_module.name, "cli") == 0) { | |
11 | if (*php_ini_search_path) { | |
12 | @@ -339,7 +340,6 @@ | |
13 | } | |
14 | ||
15 | /* Add binary directory */ | |
16 | -#ifdef PHP_WIN32 | |
17 | binary_location = (char *) emalloc(MAXPATHLEN); | |
18 | if (GetModuleFileName(0, binary_location, MAXPATHLEN) == 0) { | |
19 | efree(binary_location); | |
20 | @@ -356,6 +356,8 @@ | |
21 | binary_location = NULL; | |
22 | } | |
23 | #endif | |
24 | + | |
25 | +#ifdef PHP_WIN32 | |
26 | if (binary_location) { | |
27 | char *separator_location = strrchr(binary_location, DEFAULT_SLASH); | |
28 | ||
29 | @@ -370,7 +372,6 @@ | |
30 | } | |
31 | ||
32 | /* Add default location */ | |
33 | -#ifdef PHP_WIN32 | |
34 | default_location = (char *) emalloc(MAXPATHLEN + 1); | |
35 | ||
36 | if (0 < GetWindowsDirectory(default_location, MAXPATHLEN)) { |