может у тебя включена буферизация? См. Output control functions
и в php.ini  посмотри на такие строки:
; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP\'s output layer a
; bit.  You can enable output buffering during runtime by calling the output
; buffering functions.  You can also enable output buffering for all files by
; setting this directive to On.
output_buffering = Off