cvs: php4 /pear/PEAR Config.php
| From: | Stig Bakken | Date: | Mon, 17 Jun 2002 13:56:39 +0000 |
| Subject: | cvs: php4 /pear/PEAR Config.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4663@lists.php.net to get a copy of this message | ||
ssb Mon Jun 17 09:56:39 2002 EDT
Modified files:
/php4/pear/PEAR Config.php
Log:
* 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.
Index: php4/pear/PEAR/Config.php
diff -u php4/pear/PEAR/Config.php:1.29 php4/pear/PEAR/Config.php:1.30
--- php4/pear/PEAR/Config.php:1.29 Sun Jun 2 09:07:18 2002
+++ php4/pear/PEAR/Config.php Mon Jun 17 09:56:38 2002
@@ -16,7 +16,7 @@
// | Author: Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: Config.php,v 1.29 2002/06/02 13:07:18 ssb Exp $
+// $Id: Config.php,v 1.30 2002/06/17 13:56:38 ssb Exp $
require_once 'PEAR.php';
@@ -45,6 +45,22 @@
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());
/**