PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
You have to make sure there is no output before the header statement, including spaces or blank lines ( <?php needs to be first character in the file.
Also check the source code, on you xamp server, you may have warnings disabled from showing, but on the live server they are displaying, and you may have something generating a warning or notice, yet it is in a place on the page that you are not seeing it, but will see it at the top of the View->Source for the page.
Lastly, make sure you always add an exit; statement after a header redirect. I even do this if it is at the end of the file, just in case later some thing else gets added.
Also for me it's the other way around with wamp on my laptop. I can have up to 71 characters of output before using header and it works on my laptop.
On my old php4 server I would let me get away with 90 characters of output and header would still work.
When I got a new php5 server of course everything broke!
Best thing to do is exactly what twindev said. Especially calling exit() after header(). If you're using an MVC and all your "pages" are actually triggered by functions you might accidentally write return; out of habit instead of exit. Double check. Always call exit after a header().