From: Stig Bakken Date: Mon, 17 Jun 2002 13:56:38 +0000 (+0000) Subject: * php-4.2.1-installer.exe for Windows is installed in c:\php by X-Git-Tag: php-4.3.0dev_zend2_alpha2~225 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=271c2526df3a42e4e428b90e28d270198f43b243;p=php * php-4.2.1-installer.exe for Windows is installed in c:\php by default, but it has PHP_SYSCONFDIR set to c:\php4. workaround. --- diff --git a/pear/PEAR/Config.php b/pear/PEAR/Config.php index c37a001dc5..e62914041c 100644 --- a/pear/PEAR/Config.php +++ b/pear/PEAR/Config.php @@ -45,6 +45,22 @@ define('PEAR_CONFIG_DEFAULT_DATADIR', PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'data'); define('PEAR_CONFIG_DEFAULT_TESTDIR', PEAR_INSTALL_DIR.DIRECTORY_SEPARATOR.'tests'); +if (@is_dir(PHP_SYSCONFDIR)) { + define('PEAR_CONFIG_SYSCONFDIR', PHP_SYSCONFDIR); +} else { + if (OS_WINDOWS) { + if (@is_dir('c:\php')) { + define('PEAR_CONFIG_SYSCONFDIR', 'c:\php'); + } elseif (@is_dir('c:\php4')) { + define('PEAR_CONFIG_SYSCONFDIR', 'c:\php4'); + } elseif (@is_dir('c:\program files\php')) { + define('PEAR_CONFIG_SYSCONFDIR', 'c:\program files\php'); + } + } + if (!defined('PEAR_CONFIG_SYSCONFDIR')) { + define('PEAR_CONFIG_SYSCONFDIR', PHP_SYSCONFDIR); + } +} define('PEAR_DEFAULT_UMASK', umask()); /**