-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.8
-
None
-
None
Currently if the following conditions hold true:
1. output_handler is set in php.ini to ob_gzhandler;
2. output compression is not enabled in phpbb
then exit_handler performs a flush() call.
However, the way ob_gzhandler is implemented is it sets content encoding headers, collects buffered output (output buffering is implicitly turned on when output_handler is used), compresses the output and prints compressed output.
The problem is that flush call in phpbb occurs before ob_gzhandler sets the headers, which is the root of the problem and somehow after going through msg_handler the entire page output is printed a second time.
What should happen is conditional determining whether to use ob_flush or flush in exit_handler should look at whether output buffering is active, not at gzip_compress setting, because as explained output buffering may be turned on outside of phpbb.
- is related to
-
PHPBB-10188 Broken compressed output when errors/warnings are handled by phpbb and output_buffering is set to 4096 and phpbb gzip is enabled
- Closed
-
PHPBB-10244 Audit flush/ob_flush calls
- Closed