From 871ed4587059e079429db3c2174a6b9b10b939ab Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sat, 20 Nov 2010 03:49:20 +0000 Subject: [PATCH 1/1] MDL-25314 adding some header/session related notes --- lib/setup.php | 1 + lib/setuplib.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/setup.php b/lib/setup.php index 5ea062d2251..d1e951446e9 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -345,6 +345,7 @@ $CFG->httpswwwroot = $CFG->wwwroot; require_once($CFG->libdir .'/setuplib.php'); // Functions that MUST be loaded first if (NO_OUTPUT_BUFFERING) { + // we have to call this always before starting session because it discards headers! disable_output_buffering(); } diff --git a/lib/setuplib.php b/lib/setuplib.php index e6fa28b558f..33ddf81c7f4 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -964,7 +964,9 @@ function get_real_size($size = 0) { } /** - * Try to disable all output buffering + * Try to disable all output buffering and purge + * all headers. + * * @private to be called only from lib/setup.php ! * @return void */ -- 2.43.0