diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 8af6ff0f4a8..0916144055d 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -6601,7 +6601,9 @@ function moodle_request_shutdown() { // initially, we are only ever called under apache // but check just in case - if (function_exists('apache_child_terminate') && function_exists('memory_get_usage')) { + if (function_exists('apache_child_terminate') + && function_exists('memory_get_usage') + && ini_get_bool('child_terminate')) { if (empty($CFG->apachemaxmem)) { $CFG->apachemaxmem = 25000000; // default 25MiB }