Recent Post

Categories

Archives

Cow Computing

10 Mar 8

WordPress Error: Cannot Modify Header Information

Have you ever encountered the error: “Cannot modify header information” when you try to access the admin page of wordpress? The debug message might have suggested you to look at “pluggable.php”. When searching thru google, people often advise you to turn off installed-plugin one by one to see if the problem get resolved.

The above might work, but i would suggest you to try the following method before going thru the turn-off plugin cycle. For example, if you have modified “functions.php”, and the above header information header appeared right after, you can easily resolve this by removing all the extra whitespace before the “<?php” and “?>” tag. Viewing thru editor, you might not notice any whitespace, but try this trick:

  1. Remove the “>” from the “?>” tag at the end of file
  2. Then keep holding Delete key (not backspace) for a few seconds. (*note that the cursor should be locate after the “?”)
  3. You will notice some whitespace being deleted. Amazing isn’t it?
  4. Add the “>” after the “?” to properly close the php tag
  5. Save the file, and try accessing it, the header information error should have been resolved
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • Twitter

No Comments »

No comments yet.

Leave a comment