check memory_limit
This commit is contained in:
parent
150825fdd0
commit
9f23d0d63b
|
@ -65,6 +65,12 @@ 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.");
|
||||||
}
|
}
|
||||||
|
$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
|
// stop login if critical errors occured
|
||||||
if (sizeof($criticalErrors) > 0) {
|
if (sizeof($criticalErrors) > 0) {
|
||||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
||||||
|
|
Loading…
Reference in New Issue