|
|
|
When "zlib.output_compression" is turned on in the php.ini file, it breaks the output of "admin/replace.php". The only part that doesn't display is the section that would normally list all the queries being run. This seems to be happening in every version, but I've only confirmed versions 1.8.9 to 1.9.6. I've been able to fix it by adding the following two lines near the beginning of "admin/replace.php":
ini_set('zlib.output_compression',false);
ini_set('zlib.output_compression_level',-1);
|
|
Description
|
When "zlib.output_compression" is turned on in the php.ini file, it breaks the output of "admin/replace.php". The only part that doesn't display is the section that would normally list all the queries being run. This seems to be happening in every version, but I've only confirmed versions 1.8.9 to 1.9.6. I've been able to fix it by adding the following two lines near the beginning of "admin/replace.php":
ini_set('zlib.output_compression',false);
ini_set('zlib.output_compression_level',-1); |
Show » |
|
while(@ob_end_flush());
Commenting this line out will give perfect output with or without zlib.output_compression.
In /admin/index.php ob_end_clean() has been substituted for ob_end_flush() in core, with the comments "ob_end_flush prevents sending of headers".
Interestingly, ob_end_flush() and ob_end_clean() are used in a handful of Moodle pages and they don't seem to be causing problems. The only difference I can tell with the replace.php script is that output has already started when the function is called, and indeed if ob_end_flush() is placed in replace.php before output then it runs as expected.