4
On the same hosting server, some accounts support ob_gzhandler
and send the compression page to the browser:
/* Sending gz-encoded data to web browsers
* that support compressed web pages
*/
ob_start("ob_gzhandler");
But other accounts with the code above fail and trigger the following error:
Content Encoding error
The page you are trying to open cannot be displayed because it uses an unsupported or invalid form of compression.
Contact those responsible for the site to inform them about this problem.
Question
How to discern the cause of invalid encoding error?
Note: The PHP configuration for both domains is rigorously the same, just like the Apache directives.
The script that generates the error is also exactly the same for all accounts?
– André Ribeiro
Maybe I’m talking nonsense, is that really the settings are on the users in the right way? I mean if the server is "virtual" maybe the access settings are not pointed correctly. I think a simple
phpinfo();
tested on each server would provide you with the necessary information.– Guilherme Nascimento
@Guilhermenascimento This was one of the first things to be analyzed. The result of
phpinfo()
is just like for all the accommodation concerned. :)– Zuul
@Andréribeiro No, the error comes in all projects of the same file responsible for debiting the web-site to the browser. But from project to project this file has some differences given its antiquity.
– Zuul
@Zuul Take a look in this answer on Soen. I think that might be your problem.
– André Ribeiro
In the Apache Environment what he returns in
HTTP_ACCEPT_ENCODING
? 'Cause if you’re sure they both come back something like:gzip, deflate, lzma, sdch
then I will assume that the problem is in the script, I will assume one thing, when uploading the file to another server maybe FTP used BINARY instead of ASCII, or so you used some online editor that encoded your document with UTF8 with GOOD instead of UNWELL. It’s just a theory.– Guilherme Nascimento