Are you facing Content Encoding Error (content_encoding_error) ?
This guide is for you.
Content Encoding Error is a web server whose HTTP response headers indicate that it will be responding with one type of encoding, but instead responds with a different type of encoding.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix Content Encoding Error.
In this context, we shall look into fix this HTTP error.
The answer for this is a web server whose HTTP response headers indicate that it will be responding with one type of encoding.
But, instead of this, it responds with a different type of encoding.
This error occurs when there are corrupted files in the browser cache. So, clearing the browser cache will fix this in such cases.
Also, this content encoding error may be caused by other things. One such is PHP error.
Recently, one of our customers approached us saying that when he tried to go to a website, he is getting an error like the one shown below;
Content Encoding Error (content_encoding_error)
Server response could not be decoded using encoding type returned by server.
This is typically caused by a Web Site presenting a content encoding header of one type, and then encoding the data differently.
Also, he was receiving this error message continuously when he tries to go to the website in the browser.
1. Therefore, we checked in detail and did the following:
i. Firstly, we logged in to the cPanel of the domain.
ii. Then, under 'MultiPHP INI Editor', we enabled 'zlib.output_compression'.
This resolved the error.
2. You can also try to access the site after clearing the browser cache or cookies. It most likely will not fix the problem permanently or even temporarily.
3. In other cases, we do the same in the php.ini file of the site in order to solve the problem.
In the php.ini file, we make the value of zlib.output_compression to ON state.
On Debian/Ubuntu, you can check the php.ini file which is located at /etc/php5/apache2/php.ini with the command;
vi /etc/php5/apache2/php.ini
On Fedora/CentOS/RedHat, it's /etc/php.ini:
vi /etc/php.ini
Find the zlib.output_compression line and turn zlib.output_compression on:
zlib.output_compression = On
Then Restart Apache afterwards:
On Debian/Ubuntu, you run:
/etc/init.d/apache2 restart
On Fedora/CentOS/RedHat, you run:
/etc/init.d/httpd restart
4. It could be a issue with gzip. Open a new tab and enter the following "about:config" then you'll see a warning to be careful just confirm it. In the search bar enter "network.http.accept-encoding". Make sure its value is gzip, deflate if not right click it and click the option to reset. Some people report changing it to "true" can fix the problem but I would not recommend it since it's most likely going to cause more problems down the road.
5) Check your firewall especially if you're using Zone Alarm. Removing all the added programs and resetting the defaults actually fixed it the first time for me.
6) Clear your ssl slate by going into your control panel then clicking internet options. Once open click the content tab and click clear ssl slate.
7) Are you using a custom DNS? IE OpenNic if so turn it off to make sure. If you don't know what I'm talking about ignore this.
8) Run a good privacy cleaning program like Advanced System Care or whatever you use to do that.
The last time it happened to me I did all of the following followed by a reboot. I've not had the issue again in any browser and it's been a good while now.
We always ensure to fix the problems of our customers.
This article will guide you on steps to resolve #Content #Encoding #Error (content_encoding_error) which makes the server returns a #gzip compressed object, but the content is actually text.
The cause of this error message is a #web server whose #HTTP response headers indicate that it will be responding with one type of encoding, but instead responds with a different type of encoding. For example, what is commonly seen is that a web server returns a gzip compressed object, but the content is actually text.