]> granicus.if.org Git - php/commitdiff
MFH (pcre sanity check)
authorIlia Alshanetsky <iliaa@php.net>
Sat, 19 Apr 2003 18:12:07 +0000 (18:12 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 19 Apr 2003 18:12:07 +0000 (18:12 +0000)
run-tests.php

index 9f71f3899ae23df259b51669f6f60145ef9665c1..57c4b44b70af18d85c2c85be065d82e09b9c8728 100755 (executable)
  * - do not test PEAR components if base class and/or component class cannot be instanciated
  */
 
+
+/* Sanity check to ensure that pcre extension needed by this script is avaliable.
+ * In the event it is not, print a nice error message indicating that this script will
+ * not run without it.
+ */
+
+if (!extension_loaded("pcre")) {
+       echo <<<NO_PCRE_ERROR
+
++-----------------------------------------------------------+
+|                       ! ERROR !                           |
+| The test-suite requires that you have pcre extension      |
+| enabled. To enable this extension either compile your PHP |
+| with --with-pcre-regex or if you've compiled pcre as a    |
+| shared module load it via php.ini.                        |
++-----------------------------------------------------------+
+
+NO_PCRE_ERROR;
+exit;
+}
+
 // change into the PHP source directory.
 
 if (getenv('TEST_PHP_SRCDIR')) {