Fixed Zlib compression and PHP8.x no longer compatible with XenForo


Well-known member
You can use zlib. You just need to ensure that zlib.output_compression is disabled in MultiPHP INI Editor.
For future reference, there are three separate concepts at play here:
  1. PHP's zlib extension, which is either enabled or disabled when PHP is compiled.
  2. PHP's zip extension, which is a separate extension that can be enabled or disabled without recompiling PHP.
  3. zlib output compression, which is an optional feature in PHP's zlib extension that is disabled by default even if PHP's zlib extension is enabled.
Both zlib and zip are for dealing with compressed streams and files, but they handle different container formats:
  • zlib handles GZIP (.gz files), zlib (.z files), and raw DEFLATE streams
  • zip handles PKZIP (.zip files)
GZIP, zlib, and PKZIP are all container formats for DEFLATE, so they're all similar. DEFLATE is the actual compression, while the container formats offer a means of attaching extra metadata to the compressed stream. Despite its similarities with the other container formats, PKZIP is handled separately for historical reasons. php-zip and php-zlib don't interact.

The zlib.output_compression option is part of the PHP zlib extension; it has no relation to php-zip. If zlib.output_compression is enabled, the extension will attempt to compress the response to the browser using GZIP or DEFLATE, assuming the browser indicates support for either of those.

Disabling php-zip will not affect zlib.output_compression and will not work around the issue described here.