wez Sat Dec 6 11:04:35 2003 EDT Modified files: /php-src/ext/standard config.w32 /php-src/main php_ini.c /php-src/win32/build config.w32.h.in Log: Fix a problem resolving the php.ini path under win32 terminal services environment. Remove config-file-path option from configure under win32; it is not used except to display what might have been chosen, so lets default to the getenv() thingy. Index: php-src/ext/standard/config.w32 diff -u php-src/ext/standard/config.w32:1.2 php-src/ext/standard/config.w32:1.3 --- php-src/ext/standard/config.w32:1.2 Sat Dec 6 10:16:17 2003 +++ php-src/ext/standard/config.w32 Sat Dec 6 11:04:33 2003 @@ -1,18 +1,9 @@ // vim:ft=javascript -// $Id: config.w32,v 1.2 2003/12/06 15:16:17 wez Exp $ +// $Id: config.w32,v 1.3 2003/12/06 16:04:33 wez Exp $ ARG_WITH("config-file-scan-dir", "Dir to check for additional php ini files", ""); AC_DEFINE("PHP_CONFIG_FILE_SCAN_DIR", PHP_CONFIG_FILE_SCAN_DIR); -ARG_WITH("config-file-path", "Where to find php.ini", - '(getenv("SystemRoot"))?getenv("SystemRoot"):""'); - -if (PHP_CONFIG_FILE_PATH == null) { - AC_DEFINE("PHP_CONFIG_FILE_PATH", PHP_CONFIG_FILE_PATH, null, false); -} else { - AC_DEFINE("PHP_CONFIG_FILE_PATH", PHP_CONFIG_FILE_PATH); -} - EXTENSION("standard", "array.c base64.c basic_functions.c browscap.c \ crc32.c crypt.c cyr_convert.c datetime.c dir.c dl.c dns.c exec.c \ file.c filestat.c formatted_print.c fsock.c head.c html.c image.c \ Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.123 php-src/main/php_ini.c:1.124 --- php-src/main/php_ini.c:1.123 Sun Oct 19 22:21:25 2003 +++ php-src/main/php_ini.c Sat Dec 6 11:04:33 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ini.c,v 1.123 2003/10/20 02:21:25 iliaa Exp $ */ +/* $Id: php_ini.c,v 1.124 2003/12/06 16:04:33 wez Exp $ */ /* Check CWD for php.ini */ #define INI_CHECK_CWD @@ -379,6 +379,32 @@ strcat(php_ini_search_path, default_location); } efree(default_location); + + { + /* For people running under terminal services, GetWindowsDirectory will + * return their personal Windows directory, so lets add the system + * windows directory too */ + typedef UINT (WINAPI *get_system_windows_directory_func)(char *buffer, UINT size); + static get_system_windows_directory_func get_system_windows_directory = NULL; + HMODULE kern; + + if (get_system_windows_directory == NULL) { + kern = LoadLibrary("kernel32.dll"); + if (kern) { + get_system_windows_directory = (get_system_windows_directory_func)GetProcAddress(kern, "GetSystemWindowsDirectoryA"); + } + } + if (get_system_windows_directory != NULL) { + default_location = (char *) emalloc(MAXPATHLEN + 1); + if (0 < get_system_windows_directory(default_location, MAXPATHLEN)) { + if (*php_ini_search_path) { + strcat(php_ini_search_path, paths_separator); + } + strcat(php_ini_search_path, default_location); + } + efree(default_location); + } + } #else default_location = PHP_CONFIG_FILE_PATH; if (*php_ini_search_path) { Index: php-src/win32/build/config.w32.h.in diff -u php-src/win32/build/config.w32.h.in:1.1 php-src/win32/build/config.w32.h.in:1.2 --- php-src/win32/build/config.w32.h.in:1.1 Tue Dec 2 18:17:04 2003 +++ php-src/win32/build/config.w32.h.in Sat Dec 6 11:04:34 2003 @@ -1,9 +1,10 @@ /* Build Configuration Template for Win32. - $Id: config.w32.h.in,v 1.1 2003/12/02 23:17:04 wez Exp $ + $Id: config.w32.h.in,v 1.2 2003/12/06 16:04:34 wez Exp $ */ /* Default PHP / PEAR directories */ +#define PHP_CONFIG_FILE_PATH (getenv("SystemRoot"))?getenv("SystemRoot"):"" #define CONFIGURATION_FILE_PATH "php.ini" #define PEAR_INSTALLDIR "@[EMAIL PROTECTED]" #define PHP_BINDIR "@PREFIX@"
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php