Warning: Cannot modify header information – headers already sent by (output started at

Out of no where I start seeing following warnings on one of my Drupal Site. I haven’t changed any files recently.

Warning: Cannot modify header information – headers already sent by (output started at /home/../public_html/includes/database.mysql.inc:128) in /home/…/public_html/includes/bootstrap.inc on line 636

Warning: Cannot modify header information – headers already sent by (output started at /home/…/public_html/includes/database.mysql.inc:128) in /home/…/public_html/includes/bootstrap.inc on line 637

Warning: Cannot modify header information – headers already sent by (output started at /home/…/public_html/includes/database.mysql.inc:128) in /home/…/public_html/includes/bootstrap.inc on line 638

Warning: Cannot modify header information – headers already sent by (output started at /home/…/public_html/includes/database.mysql.inc:128) in /home/…/public_html/includes/bootstrap.inc on line 639

This error is gone either when I empty Drupal Cache.
There is one more similar problem

warning: Cannot modify header information – headers already sent by (output started at /home/…/public_html/includes/database.mysql.inc:128) in /home/…/public_html/includes/common.inc on line 148.

I checked the common.inc, database.mysql.inc and database.mysql.inc files but I found nothing to suspect. In most cases it is related to error checking or cache.

Error checking seems to be normal and nothing unusual about it.

What about Drupal Cache? Not sure what is causing problem here.

There is a discussion on this topic on Drupal. The suggestions given there is related with the empty space at the end of file and any modules which might be causing problem. However I haven’t installed any new module or changed anything recently in these modules.

So for a quick check I checked these common files and removed any space at the end of file. Top do so open the file in any text editor, put cursor at the last character and hit DEL key repeatedly.

Will wait and see if it solves the problem.

There is a another suggestion related to output_buffering on/off in your php.ini Someone solved this problem by changing OUTPUT_BUFFER=OFF to OUTPUT_BUFFER=ON.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *