Devoured By Lions

the eternal struggle to tame complexity

Drupal and Gzip Compression

In the process of trying to get the Drupal Image module -based gallery working I discovered my PHP GD did not support jpeg images. I upgraded to PHP 5.2.9 in the process, enabling jpeg support as well as gzip/zlib. For the two existing Drupal sites I had up, and for which I had enabled caching and compression under the Performance settings, all of a sudden Firefox started reporting a content encoding error and would not render content. I suspected the gzip support I had just compiled in, and at first I thought this might be due to my reverse proxy configuration (by the way, Drupal 6.10 installation worked through the proxy just fine; I didn’t even realize this until afterwards). However, I eventually determined (after reverting and reading the Performance settings details more closely) that Drupal applies the compression to the cached content. After I cleared the cache, the sites started working again. Some testing with wget revealed what clearly was happening: Drupal was claiming the cached content was gzipped when it really wasn’t, because at the time it was cached, gzip support wasn’t available (even though the option was enabled in the Drupal settings).

So galleries are working now. For some reason I had to set Thickbox to use the ‘Original’ image and not the ‘Preview’ which is the default. I don’t know what the difference is - ‘Original’ sounds like what one would want anyway.