Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

php appears to be adding junk characters to the end of everything it returns on a friend's site. I'm not an admin on the server but I'd like to give an informed complaint to get this fixed.

The site is You can see some junk at the end of every page on the site (what appear to be question marks with something else in the middle). I originally thought this was a wordpress issue, but check out (which is just a call to phpinfo), and (which is just 'Hello World').

I'm not sure if this is the most appropriate site, but I think this is a server config issue, so I'm posting it here (rather than stackoverflow or superuser). Feel free to move it if want.

UPDATE: Problem seems to have fixed itself.

share|improve this question
up vote 4 down vote accepted

The problem is being caused by mod_gzip and the fact that you do not have a final newline in your files. The newline problem is caused by serving Windows-encoded files on a Unix system.

share|improve this answer
Interesting. I noticed that when I look at the page with firefox on my mac I see the extra characters, but if I use curl or wget I don't see them. – Phil Hollenback Jan 17 '11 at 18:02
@phil-hollenback That's because wget (and probably curl) do not by default accept gzip encoding. Try wget --header="accept-encoding: gzip" – Mark Wagner Jan 17 '11 at 18:26

Check your php.ini or php3.ini file on the server and see if you have auto_append set. That appends a footer to every php page output.

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.