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

zeeb0t

New member
Affected version
v2.2.8 Patch 1
Hello,

As per https://xenforo.com/community/threads/xenforo-white-paged-on-php-8-1.204682/

It was found that as of this morning (25th March, 2022 6am~ AEST) there must have been an update surrounding Zlib for PHP and as such, XenForo will no longer operate successfully (it provides a compression error) when running on PHP8.x with Zlib.

Disabling zlib compression resolves the issue.

I note zlib and XenForo works correctly on all prior versions of PHP.

Thank you
 
And if you disable zlib you can no longer install from archive. :(

Oops! We ran into some problems.
Installing from archives is only supported if you have ZipArchive support. You may need to ask your host to enable this.

We need a patch to fix this ASAP!
 
How does that help? It's just a link to this thread.

Oh I see: Go to PHP MultiPHP INI Editor and turn off the last line "zlib.output_compression". Then re-enable php-zip in easyy apache.
 
Last edited:
How does that help? It's just a link to this thread.

Oh I see: Go to PHP MultiPHP INI Editor and turn off the last line "zlib.output_compression". Then re-enable php-zip in easyy apache.
I can confirm that the above works on three different servers running
Operating System: CentOS v7.9.2009
Product: cPanel & WHM v102.0.8 (STANDARD)
 
My forum XF 2.2.8.1 en PHP 8.1 - zLib.output_compression -= true.
No problems.

When initially testing this bug at 1:AM the other day it appeared to only affect certain browsers, likely do to browser caching at the time. Since it was a live site I didn’t test for very long before reverting to a lower PHP (before the z.lib compression workaround was an mentioned as a temp fix). Just be aware some of your users may still be having issues even if you are not.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.9).

Change log:
Ensure zlib output compression is disabled to prevent interference with XF output compression
There may be a delay before changes are rolled out to the XenForo Community.
 
Is this really the solution, though? shouldn't using zlib be an option that doesn't break xf? what if there are other sites on the server?
 
How does that help? It's just a link to this thread.

Oh I see: Go to PHP MultiPHP INI Editor and turn off the last line "zlib.output_compression". Then re-enable php-zip in easyy apache.

I can confirm that the above works on three different servers running
Operating System: CentOS v7.9.2009
Product: cPanel & WHM v102.0.8 (STANDARD)

Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.9).

Change log:

There may be a delay before changes are rolled out to the XenForo Community.

Is this really the solution, though? shouldn't using zlib be an option that doesn't break xf? what if there are other sites on the server?

Yes it is the solution. You can use zlib. You just need to ensure that zlib.output_compression is disabled in MultiPHP INI Editor.
 
Is this really the solution, though? shouldn't using zlib be an option that doesn't break xf? what if there are other sites on the server?
Perhaps the change log could have been clearer, but it merely disables zlib.output_compression within XF itself. You can still leave it enabled globally. It has no bearing on other sites or scripts and does not otherwise affect the zlib extension. XF already compresses output by default, regardless of the global setting.
 
Perhaps the change log could have been clearer, but it merely disables zlib.output_compression within XF itself. You can still leave it enabled globally. It has no bearing on other sites or scripts and does not otherwise affect the zlib extension. XF already compresses output by default, regardless of the global setting.

Thanks Jeremy. I think that's a reasonable outcome.
 
Back
Top Bottom