Make sure you didn't put any spaces outside the code pairs in config.php:
//stuff
?>
^^ There can't be any trailing spaces here.
Or you can read the
FAQ entitled "Cannot modify header information - headers already sent by ..." by going to the FAQ link under support on the left menu of this website.