settings.php after migration I transferred my files via FTP and database to a hosting service. I edited two files, settings.php and sites/default/settings.php whose content was originally the following.

$databases = array (
  'default' =&gt; 
  array (
    'default' =&gt;
    array (
      'database' =&gt; 'db',
      'username' =&gt; 'loginname',
      'password' =&gt; 'passwd',
      'host' =&gt; 'localhost',
      'port' =&gt; '',
      'driver' =&gt; 'mysql',
      'prefix' =&gt; '',
    ),
  ),
);


I changed the database name, username, password and host (to yes.domainname.com) in both files.

There is probably something wrong because I get this warning.


  Warning: Cannot modify header information - headers already sent by (output started at /web/www/yes.domainname.com/sites/default/settings.php:1) in drupal_send_headers() (line 1044 of /web/www/yes.domainname.com/includes/bootstrap.inc).


Do you know what is wrong?
Verify that there are not extra characters at the beginning of the file, right before the &lt;?php part; this would cause the error you have seen.
Sometimes the editors add the BOM (Byte Order Mark) when saving an Unicode file; verify Unicode is not the text encoding used to save the file, or that the editor is not set to add the BOM to the files it saves as Unicode.
The BOM characters are not normally visible in a text editor; if the editor has the option to show characters that have a specific code, or "invisible characters," that can help to notice them.

Alternatively, the file got corrupted when transferred.