PHP Compression with GZip: Content Encoding Error
Site returns Content Encoding Error or similar error
Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
* Please contact the web site owners to inform them of this problem.
This web page is not available.The web page at http:/domain.tld/path/to/file.ext might be temporarily down or it may have moved permanently to a new web address.
More information on this error
Below is the original error message
Safari can’t open the page.
Safari can’t open the page “http://domain.tld/path/to/file.ext;. The error is: “cannot decode raw data” (CFURLErrorDomain:-1015) Please choose Help > Report Bugs to Apple, note the error number, and describe what you did before you saw this message.
Internet Explorer 7:
IE doesn not return an error that explicitly mention content encoding or compression
Opera does not return an error, instead it displays the page content, partially compressed. Error messages will be human readable. Compressed data appears as garbage.
����y�ŝ^�Z� stnXΨW ��)���
GZip can be enabled on the server for more efficient page delivery. On occasion, PHP errors my be output that are not compressed with the rest of the page content. When this occurs, some browsers fail to identify the uncompressed error message and thus cannot output the page.
Opera can be used to view the uncompressed data and interpret the error message.
Alternatively, the linux command line
can be used to get and view the output of the file:
wget --header "Accept-Encoding: gzip,deflate" http://domain.tld/path/to/file.ext
If the page uses basic authentication:
wget --header "Accept-Encoding: gzip,deflate" http://user:email@example.com/path/to/file.ext
You can then use your preferred text editor to view the file you have just downloaded and interpret the error.
Finally you will need to resolve whatever caused the PHP error in the first place.
Opera rocks. End transmission.
(…from the one armed scissor)