print memory limit setting if too low

This commit is contained in:
Roland Gruber 2007-11-02 16:12:35 +00:00
parent a53c8c3e62
commit 526a4b4723
1 changed files with 2 additions and 1 deletions

View File

@ -72,7 +72,8 @@ if (ini_get("session.auto_start") == "1") {
$memLimit = ini_get('memory_limit');
if (isset($memLimit) && ($memLimit != '') && (substr(strtoupper($memLimit), strlen($memLimit) - 1) == 'M')) {
if (intval(substr($memLimit, 0, strlen($memLimit) - 1)) < 64) {
$criticalErrors[] = array("ERROR", "Please increase the \"memory_limit\" parameter in your php.ini to at least \"64M\".");
$criticalErrors[] = array("ERROR", "Please increase the \"memory_limit\" parameter in your php.ini to at least \"64M\".",
"Your current memory limit is $memLimit.");
}
}
// stop login if critical errors occured