Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It seems PHP upgrade "broke" all the websites using PHP on my hosts. It adds junk characters in the footer on every page which uses PHP:

enter image description here

How can I fix this problem?

share|improve this question
Can you provide the PHP source file and the generated HTML please. – womble Mar 17 '12 at 23:43 Here is an example for HTML output. For PHP sources i can't and not needed to. All pages using PHP have this problem, more than 100+ sites! Joomla, Wordpress, CodeIgniter, ExpressionEngine, and so on have these problems, even a simple echo 'Hello'; produces the same problem. – wintercounter Mar 17 '12 at 23:51
@wintercounter Which charset are these documents served with? See this related[?] SO question:… – jscott Mar 18 '12 at 0:52
Using UTF-8 but PHP 5.4 should be native UTF-8 and it's not even a charset related problem. All UTF-8 special chars are displaying ok, only these four chars added to the footer since the upgrade. It's more like an UTF8-BOM but it's not. – wintercounter Mar 18 '12 at 1:08

This sounds like a mod_gzip issue, caused by a missing final newline in the file.

It was answered previously by Mark Wagner.

share|improve this answer
It wasn't, as i said a simple <?php echo 'Hello'; ?> produced the same error. But i've fixed now, see my answer post. – wintercounter Mar 18 '12 at 11:45
up vote 1 down vote accepted

The problem was aptitude automaticly installed mod_php5filter. Needed only:

a2dismod php5filter

Than everything worked ok.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.