diff --git a/lam/templates/login.php b/lam/templates/login.php index 4f724994..9adfeb22 100644 --- a/lam/templates/login.php +++ b/lam/templates/login.php @@ -65,6 +65,12 @@ for ($i = 0; $i < sizeof($writableDirs); $i++) { 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."); } +$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\"."); + } +} // stop login if critical errors occured if (sizeof($criticalErrors) > 0) { echo "\n";