yeah.. must see the whole code.. or related file code.
since.. coding not only in 1 page. :P
if i not mistake.. (sorry, i was long time away from php handcoding

) ..
----
Let say index.php.. had ob_start() ,
in that file (index.php) also had include('header.php'); and include('db.php');
sadly.. or accidently.. in either header.php or db.php also had ob_start() .
No wonder crash happen.

That's why 'already sent'.
and the another story is = the server configuration matter itself..