diff --git a/admin/health.php b/admin/health.php index baa0561fe8e..ced7225704a 100644 --- a/admin/health.php +++ b/admin/health.php @@ -363,10 +363,10 @@ class problem_000008 extends problem_base { } $oldmemlimit = get_real_size($oldmemlimit); //now lets change the memory limit to something unique below 128M==134217728 - if (empty($CFG->memorylimit)) { + if (empty($CFG->extramemorylimit)) { raise_memory_limit('128M'); } else { - raise_memory_limit($CFG->memorylimit); + raise_memory_limit($CFG->extramemorylimit); } $testmemlimit = get_real_size(@ini_get('memory_limit')); //verify the change had any effect at all diff --git a/backup/lib.php b/backup/lib.php index 4ae77716551..4990f28488e 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -700,10 +700,10 @@ return false; } @ini_set("max_execution_time","3000"); - if (empty($CFG->memorylimit)) { + if (empty($CFG->extramemorylimit)) { raise_memory_limit('128M'); } else { - raise_memory_limit($CFG->memorylimit); + raise_memory_limit($CFG->extramemorylimit); } if (!$backup_unique_code = restore_precheck($destinationcourse,$pathtofile,$errorstr,true)) { diff --git a/backup/restore.php b/backup/restore.php index b241e013831..a039ff9525c 100644 --- a/backup/restore.php +++ b/backup/restore.php @@ -147,10 +147,10 @@ //Adjust some php variables to the execution of this script @ini_set("max_execution_time","3000"); - if (empty($CFG->memorylimit)) { + if (empty($CFG->extramemorylimit)) { raise_memory_limit('128M'); } else { - raise_memory_limit($CFG->memorylimit); + raise_memory_limit($CFG->extramemorylimit); } //Call the form, depending the step we are diff --git a/backup/try.php b/backup/try.php index 7c3d2d9e4d6..2e759305ba3 100644 --- a/backup/try.php +++ b/backup/try.php @@ -19,10 +19,10 @@ //Adjust some php variables to the execution of this script @ini_set("max_execution_time","3000"); - if (empty($CFG->memorylimit)) { + if (empty($CFG->extramemorylimit)) { raise_memory_limit('128M'); } else { - raise_memory_limit($CFG->memorylimit); + raise_memory_limit($CFG->extramemorylimit); } echo "
\n";
diff --git a/search/cron_php5.php b/search/cron_php5.php
index 9c3f939c705..f6a28b0b41b 100644
--- a/search/cron_php5.php
+++ b/search/cron_php5.php
@@ -8,10 +8,10 @@
 try{
     // overrides php limits
     ini_set('max_execution_time', 300);
-    if (empty($CFG->memorylimit)) {
+    if (empty($CFG->extramemorylimit)) {
         raise_memory_limit('128M');
     } else {
-        raise_memory_limit($CFG->memorylimit);
+        raise_memory_limit($CFG->extramemorylimit);
     }
 
     mtrace("\n--DELETE----");