Yeah, check with your favourite text editor, if your file encoding is UTF-8 with BOM. If it is, convert it to 'UTF-8' without BOM and see if it does the trick.
As for the why:
BOM - ByteOrderMask is an 'invisible' three-character string, which is embedded at the very beginning of your script. Before anything else, the BOM is written. And since it isn't within the PHP tags, it is also sent to the client, which is why you're getting the 'headers already sent' error when trying to send out your own headers.
PHP can't handle UTF-8 files with BOM to my knowledge and it really isn't necessary either, since UTF8 itself has the Endianess problem covered. (Unlike UTF16 for example)
If you're unsure and your editor doesn't tell you either, feel free to open your source file in a hex editor and look at the first three characters. If they aren't the ascii representation of '
Edit:
As pointed out in the comment section, BOM is represented as the hexadecimal values EF BB BF
(in this order) for UTF-8. For an UTF-8 incapable editor, this would appear as 
.
For more information, you may want to consult this Wikipedia article