Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I gave Boost a try on my slimmed-down VPS, where the PHP install doesn't have the Zlib library installed. I disabled Gzip encoding in Boost. However, the server error logs were filling with complaints about a call to the undefined function gzencode() on line 2699. On further inspection, it looks like Boost calls gzencode() on data it is about to cache, regardless of whether it's going to cache the Gzipped version or the uncompressed version:
$compressed_buffer = gzencode($buffer, 9);
foreach ($filenames as $key => $values) {
if ($key == 'gzip') {
$data = $compressed_buffer;
}
else {
$data = $buffer;
}
// We never see $compressed_buffer again
What's up with that? Patch attached.
Comment | File | Size | Author |
---|---|---|---|
boost-stop-gzipping.patch | 497 bytes | Garrett Albright | |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedIt's what happens when you rewrite the function multiple times, trying to make it better; this was a pretty dub error though. Thanks for seeing this.
Committed