-1

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.

SidOfc
  • 4,552
  • 3
  • 27
  • 50
  • Please post the script or we can't help you. Use Pastebin.com or Gist. – Brandon Oct 13 '13 at 11:53
  • What exactly is "Content-Encoding Problem"? Please at least write down the error you face. – Sgn. Oct 13 '13 at 11:58
  • I'm at work at the moment, but I will post the code of the client class in a pastebin / gist when I get home, thanks for the effort so far anyway people. – SidOfc Oct 14 '13 at 13:00

1 Answers1

1

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.

SidOfc
  • 4,552
  • 3
  • 27
  • 50
  • 1
    By the way. You don't have to end your file with ?> there really is no reason to do so unless you need to switch back to echo mode. Just end the fine with a line of code end by a semi-colon. Any white-space accidentally added to the end won't hurt anything. – JohnDavid Nov 04 '14 at 16:40
  • @JohnDavid - true that, didn't realize that at the time tho +1 for that ;) – SidOfc Nov 07 '14 at 10:04