Drupal 7.56, PHP 5, PHP-FPM, multi-site Ubuntu 14.04.1 LTS server

EDIT: it's NOT only when I'm logged in to my site do I get this error:

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

It happens 1/3 of the time I try to load a page. If I click "try again" twice or refresh the page twice it will load. I have followed these steps from the accepted answer on Content encoding error after enabling cache, aggregation and compression

$conf = array(
'cache' => '0',
'preprocess_css' => '0',
'preprocess_js' => '0',
'block_cache' => '0',
'page_compression' => '0',

I have also checked php.ini, per other resolutions, and error reporting is off.

I checked for PHP error reporting per https://www.drupaleasy.com/quicktips/browser-fail-unsupported-form-compression-related-php-notice and https://www.drupal.org/node/373101 and when I ran the wget command there was no PHP error up top.

The behavior does not change at all after clearing my browser's cache.

FWIW I've tested by disabling every module I could (I'm fighting AddThis right now). I also had to increase the memory limit from 128M to 1000M because I kept getting 500 errors too. See my note on 500 Internal Server Error after logging in

I also had to update a theme.inc file based on this error:

/e modifier is no longer supported, use preg_replace_callback instead in…

as seen at https://stackoverflow.com/questions/38067166/replace-preg-replace-with-preg-replace-callback-still-failing?noredirect=1&lq=1

UPDATE: the 500 error seems to have been fixed with a permissions reset. I put the memory_limit back to 128M after the permissions reset and no more 500 errors. I got one from Chrome at first but maybe it was a cached thing? Now no more.

Also, per Anson W Han in the comments, I have tried reverting my change to the theme file with no success. And the theme is supposed to be best with PHP 5.2-5.6 and I am running PHP 5.5.9

UPDATE: the 500 error is NOT resolved after all

  • Did you recently upgrade the server, or any code? Commented Feb 12, 2018 at 22:45
  • This is a theme we bought. So in a sense yes everything was recently updated. I will have to test and see if my change to the theme.inc file affected it, thanks for that reminder of what should have been an obvious first step. Commented Feb 12, 2018 at 22:46
  • Also- may be worth checking the version of PHP, especially if the theme is developed/requires 5.6 or higher. (Many hosting providers have stopped supporting PHP 5.5 and lower). Commented Feb 12, 2018 at 22:49
  • I undid the change to the theme file and it didn't help. Also, the theme seller said it will work best with PHP 5.2-5.6 and I have PHP 5.5.9. Also, we're not using a hosting provider, it's our own servers. I'm waiting to hear back from their escalation team but it was suggested to either disable gzip or confirm that the content is in fact encoded. I do not want to disable gzip because there are 10 sites on this box - unless it can be done for just one site. Also, how do I confirm it's encoded? Wouldn't my wget have shown me an encoded file if it's all garbled like it was? Commented Feb 13, 2018 at 15:16

1 Answer 1


Looking in the log file there were some FastCGI references, but in ISPConfig I had PHP-FPM selected. Once it was switched to MOD-PHP all of my problems disappeared. I can't even.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.