Trata no usando la etiqueta de cierre ?>. Cuando el código es PHP puro no es necesario usar la etiqueta de cierre y asegúrate que no tengas espacios en la primera etiqueta.
Edito:
Mira lo que dice este comentario del libro Zend PHP 5 Certification
Cita: Newline Characters
It is important to remember that every character outside of PHP tags is copied as-is
by the interpreter to the script’s output—and this includes newline characters.
Newlines are, normally, ignored by browsers, as they are non-semantic characters
in HTML. However, they are also used as separators between the header portion of
a web server’s HTTP response and the actual data; therefore, outputting a newline
character before all of the headers have been written to the output can cause some
rather unpleasant (and unintended) consequences. To mitigate this problem, the
first newline directly after a closing tag (?> only) is stripped by the parser. Doing so
also solves a problem introduced by the fact that a number of popular text editors
will automatically prepend a newline to the end of your file, thus interfering with
include files which are not supposed to output any text
An easy way to prevent spurious output from an include file is to omit the closing tag
at the end, which the parser considers this perfectly legal.