When you see the “cannot modify header information – headers already sent by” error message take a closer look at the file listed in the error. The issue is commonly in the extra “white space” in the code. For example take a look at this error generated by Drupal:
warning: Cannot modify header information – headers already sent by (output started at /home/2by2host/2by2host.com/sites/all/themeeMed/template.php:7) in/home/2by2host/public_html/2by2host.com/includes/common.inc on line 148.
The error is in the template.php file. We opened it up and found the following on line 7:
We removed the line between the tags and the problem was fixed.