You can't use the header() function if you've already outputted something to the visitor. This includes spaces. When you were modifying the config.php file, you probably included a space somewhere. even a space before <? php tags will cause this problem. Also html tags cannot be before the header() function.
If you can't find the spot, just redownload the config.php file, replace it, and input your credentials again, watching out for spaces.
Cgraz