added PCRE check
This commit is contained in:
parent
b770d71ce2
commit
497ab97997
|
@ -87,6 +87,7 @@ for ($i = 0; $i < sizeof($writableDirs); $i++) {
|
||||||
if (ini_get("session.auto_start") == "1") {
|
if (ini_get("session.auto_start") == "1") {
|
||||||
$criticalErrors[] = array("ERROR", "Please deactivate session.auto_start in your php.ini. LAM will not work if it is activated.");
|
$criticalErrors[] = array("ERROR", "Please deactivate session.auto_start in your php.ini. LAM will not work if it is activated.");
|
||||||
}
|
}
|
||||||
|
// check memory limit
|
||||||
$memLimit = ini_get('memory_limit');
|
$memLimit = ini_get('memory_limit');
|
||||||
if (isset($memLimit) && ($memLimit != '') && (substr(strtoupper($memLimit), strlen($memLimit) - 1) == 'M')) {
|
if (isset($memLimit) && ($memLimit != '') && (substr(strtoupper($memLimit), strlen($memLimit) - 1) == 'M')) {
|
||||||
if (intval(substr($memLimit, 0, strlen($memLimit) - 1)) < 64) {
|
if (intval(substr($memLimit, 0, strlen($memLimit) - 1)) < 64) {
|
||||||
|
@ -94,6 +95,10 @@ if (isset($memLimit) && ($memLimit != '') && (substr(strtoupper($memLimit), strl
|
||||||
"Your current memory limit is $memLimit.");
|
"Your current memory limit is $memLimit.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// check PCRE regex system
|
||||||
|
if (!@preg_match('/^\p{L}+$/u', "abc")) {
|
||||||
|
$criticalErrors[] = array("ERROR", "Your PCRE library has no complete Unicode support. Please upgrade libpcre or compile with \"--enable-unicode-properties\".");
|
||||||
|
}
|
||||||
// stop login if critical errors occured
|
// stop login if critical errors occured
|
||||||
if (sizeof($criticalErrors) > 0) {
|
if (sizeof($criticalErrors) > 0) {
|
||||||
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n\n";
|
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n\n";
|
||||||
|
|
Loading…
Reference in New Issue