Question

Good day to you all,

I am here with a question, I cannot seem to have this issue figured out. This is a Content-Encoding problem caused by a class of mine that I include.

As soon as I comment the class out, it works like a charm.

It is a browser identification class, it's also a static class so you don't call

new Classname();

But instead just use

Client::$System->OS

the class does not output ANY content, no echo's no print_r's or anything like that, so I am abit lost on this issue here, I have not seen this error either.

Since this class is 300 lines I'd rather not include it here, however I can upload it to dropbox for anyone to download (and use as you wish) and have a look at why it's giving me the error.

If anyone needs more clarity on the question, please comment and I will include w/e I have to.

EDIT

This problem happens with the ob_gzhandler, when I try to gzip the website and send it to the browser, the browser simply responds with "Content-Encoding Error".

This error, as mentioned above only happens when I include my browser-sniffing class as soon as I comment it out it all works fine, PS: I will post a pastebin of the actual class later in the evening.

EDIT 2

Click here for the link to the script (on pastebin) Hoping this will give enough information to solve the problem.

Was it helpful?

Solution

Found the issue.

There was a space after the closing ?> PHP tag. This caused the gz_handler to trip into thinking it was content that had been echo'd while this was not the case.

Anyways thanks for the time and effort, hopefully this will help someone with the same error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top