summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-05 11:27:48 -0800
committerBrion Vibber <brion@pobox.com>2010-03-05 13:59:39 -0800
commit54de8ad9f20a51cdaf78404c45e91a1f652670f1 (patch)
tree7c9bc08a0617b1b8881713d7124c88fd6c90607d
parent248aed7cf430d263f3d5dd98552f35f69de6fe67 (diff)
Initial install-time test for PCRE compiled without Unicode properties, which causes corruption in feeds and other linking problems.
Error message links to help info at http://status.net/wiki/Red_Hat_Enterprise_Linux#PCRE_library
-rw-r--r--install.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/install.php b/install.php
index 8c9b6138b..7fece8999 100644
--- a/install.php
+++ b/install.php
@@ -301,6 +301,19 @@ function checkPrereqs()
$pass = false;
}
+ // Look for known library bugs
+ $str = "abcdefghijklmnopqrstuvwxyz";
+ $replaced = preg_replace('/[\p{Cc}\p{Cs}]/u', '*', $str);
+ if ($str != $replaced) {
+ printf('<p class="error">PHP is linked to a version of the PCRE library ' .
+ 'that does not support Unicode properties. ' .
+ 'If you are running Red Hat Enterprise Linux / ' .
+ 'CentOS 5.3 or earlier, see <a href="' .
+ 'http://status.net/wiki/Red_Hat_Enterprise_Linux#PCRE_library' .
+ '">our documentation page</a> on fixing this.</p>');
+ $pass = false;
+ }
+
$reqs = array('gd', 'curl',
'xmlwriter', 'mbstring', 'xml', 'dom', 'simplexml');