summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pear/PEAR/Config.php16
1 files changed, 16 insertions, 0 deletions
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());
/**