I upgraded php-common and php-devel packages on CentOS 5.3 system. Now, when I try to access any PHP script in a browser I get garbage like this:
If I try to CURL GET the page, or try plain HTML, CSS or JS in the browser everything looks OK.
Encoding is set to UTF-8 in both PHP itself and the PHP output via "Content-Type: text/html; charset=UTF-8".
I am lost as to what may have caused the change? Any ideas??
We had this once. I believe this has something to do with gzip.
try to modify the
zlib.output_compression from the original value
Wow. Yea, that's unusual. My first thought was that the MOD_PHP bit in Apache must have gotten screwed up somehow (or the equivalent in whatever webserver you're using), or that it was binding to the wrong MIME type, or something...But since php isn't (minus an interpreter) compiled code, if it was truly fubared, you'd just be seeing plain text, or nothing at all, not binary gibberish. Looks more like the server is handling .php as some kind of binary file type.
I'd clear out the packages and install them again. Was the original install from "stock" packages, or did someone compile them from source? If they were compiled the first time, someone may have set options that were not set in the official packages, which might be causing your issue.
It could be some kind of encoding issue, but since you just upgraded those packages, that would be the place where I would start.