Having whitespace before the <?php line can cause some really hard to find problems.  Make sure to delete all these blank lines.