From d3f9d47aa939167ba34ed1777d218c7ed1398afd Mon Sep 17 00:00:00 2001 From: "Tomas V.V.Cox" Date: Wed, 18 Jun 2003 19:27:55 +0000 Subject: [PATCH] Be more clever for discovering the default ext_dir --- pear/PEAR/Config.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pear/PEAR/Config.php b/pear/PEAR/Config.php index 0358d7c8a2..82c36fad4a 100644 --- a/pear/PEAR/Config.php +++ b/pear/PEAR/Config.php @@ -73,7 +73,15 @@ if (getenv('PHP_PEAR_INSTALL_DIR')) { if (getenv('PHP_PEAR_EXTENSION_DIR')) { define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR')); } else { - define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); + if (!ini_get('extension_dir')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', ini_get('extension_dir')); + } elseif (defined('PEAR_EXTENSION_DIR') && @is_dir(PEAR_EXTENSION_DIR)) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PEAR_EXTENSION_DIR); + } elseif (defined('PHP_EXTENSION_DIR')) { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', PHP_EXTENSION_DIR); + } else { + define('PEAR_CONFIG_DEFAULT_EXT_DIR', '.'); + } } // Default for doc_dir -- 2.40.0