Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10191

Duplicate output when output_handler is set in php.ini

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.8
    • 3.0.9-RC1
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Oleg Oleg [X] (Inactive)
              Oleg Oleg [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: