summaryrefslogtreecommitdiff
path: root/pear
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2005-08-20 18:31:29 +0000
committerGreg Beaver <cellog@php.net>2005-08-20 18:31:29 +0000
commitf4eb5095a622097b61a626ce290154af82baea9f (patch)
tree8ad0dc922e8b1bf97c6a34e6c11707f6d9ecb74b /pear
parentf7ef84c32d492367c71d2990be83dd620181098b (diff)
downloadphp-git-f4eb5095a622097b61a626ce290154af82baea9f.tar.gz
add checks for extensions that must be loaded
Diffstat (limited to 'pear')
-rw-r--r--pear/install-pear.php13
1 files changed, 13 insertions, 0 deletions
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);