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

download/file.php with gzip compression: invalid content length produces corrupt file

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.10, 3.1.3
    • Fix Version/s: 3.0.15-RC1, 3.1.12-RC1
    • Component/s: Other
    • Labels:
      None
    • Environment:
      Debian Lenny, PHP 5.2.X, lighttpd

      Description

      Citing Support topic:

      There is a bug present in the current phpBB release preventing downloading of some file types only if gzip compression is enabled on the server (via php.ini) by default. If so, and gzip is disabled in phpbb's settings (php.ini -> enabled, phpBB -> disabled), content lengths sent by phpBB via download/file.php does not match the actual content length transfered. This is caused because phpBB sets the content length manually and PHP (5.2.X) does not correct it when compressing the transfered contents via gzip, resulting in a corrupted file after download (IE, Chrome and Firefox have been tested). I am not sure if there is something else special about my server setup, so it may, or may not, be present everywhere else (Debian Lenny, PHP 5.2.X, lighttpd).

      A simple fix for this issue is adding the following line to download/file.php:

      ini_set('zlib.output_compression', 'Off');

      For me, this solved the issue. However, a real bug fix should of course take the administrator's phpBB gzip setting into account. Hope I could help

        Attachments

          Activity

            People

            • Assignee:
              CHItA CHItA
              Reporter:
              AmigoJack AmigoJack
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: