]> granicus.if.org Git - php/commitdiff
* php-4.2.1-installer.exe for Windows is installed in c:\php by
authorStig Bakken <ssb@php.net>
Mon, 17 Jun 2002 13:56:38 +0000 (13:56 +0000)
committerStig Bakken <ssb@php.net>
Mon, 17 Jun 2002 13:56:38 +0000 (13:56 +0000)
  default, but it has PHP_SYSCONFDIR set to c:\php4.  workaround.

pear/PEAR/Config.php

index c37a001dc5c307a857fec3f772fe228c65bd03af..e62914041c48cb2820b3363d6a5ed63e85f864a4 100644 (file)
@@ -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());
 
 /**