summaryrefslogtreecommitdiff
path: root/ext-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'ext-check.patch')
-rw-r--r--ext-check.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext-check.patch b/ext-check.patch
new file mode 100644
index 0000000..440c847
--- /dev/null
+++ b/ext-check.patch
@@ -0,0 +1,19 @@
+--- PEAR-1.9.4/usr/share/pear/pearcmd.php~ 2014-05-14 19:21:49.000000000 +0300
++++ PEAR-1.9.4/usr/share/pear/pearcmd.php 2014-05-14 19:21:53.064418441 +0300
+@@ -45,6 +45,16 @@
+
+ $pear_package_version = "1.9.4";
+
++// before trying anything deep, ensure base extensions are present
++// this avoids debugging problems with bogus error messages, which really are
++// caused by missing extension
++foreach (array('pcre', 'zlib', 'xml2') as $ext) {
++ if (!extension_loaded($ext)) {
++ error_log("$argv[0] requires PHP extension $ext.");
++ exit(1);
++ }
++}
++
+ require_once 'PEAR.php';
+ require_once 'PEAR/Frontend.php';
+ require_once 'PEAR/Config.php';