From: Greg Beaver Date: Sat, 20 Aug 2005 18:32:24 +0000 (+0000) Subject: add checks for extensions that must be loaded X-Git-Tag: php-4.4.1RC1~54 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9fd935be76017d35b85b48ec3cc2d8136d8c215;p=php add checks for extensions that must be loaded --- diff --git a/pear/install-pear.php b/pear/install-pear.php index d2d1b804f9..68a43cb30c 100644 --- a/pear/install-pear.php +++ b/pear/install-pear.php @@ -9,6 +9,19 @@ include_once 'PEAR/Installer.php'; include_once 'PEAR/Registry.php'; include_once 'PEAR/Frontend/CLI.php'; +$a = true; +if (!PEAR::loadExtension('xml')) { + $a = false; + echo "[PEAR] xml extension is required\n"; +} +if (!PEAR::loadExtension('pcre')) { + $a = false; + echo "[PEAR] pcre extension is required\n"; +} +if (!$a) { + return -1; +} + $force = false; $install_files = array(); array_shift($argv);