Cannot modify header information - headers already sent by

by Alex Benko, 2by2host
2011-01-11 18:12:18

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:
?>

<?php

We removed the line between the tags and the problem was fixed.

We can easily fix an issue like that for you if you are our shared hosting or managed shared hosting customer.