Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 http://daytoncodebreakers.org. 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 http://daytoncodebreakers.org/whereisini.php (which is just a call to phpinfo), and http://daytoncodebreakers.org/hello.php (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

2 Answers 2

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
1  
@phil-hollenback That's because wget (and probably curl) do not by default accept gzip encoding. Try wget --header="accept-encoding: gzip" http://daytoncodebreakers.org/hello.php –  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

 
discard

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.