ThemeLib logo
  • Home
  • Blogger
    • Blogger Templates
    • Blogger Tutorials
    • Blogger Widgets
  • Wordpress
    • Wordpress Themes
    • Wordpress Plugins
    • Wordpress Tutorials
  • Money Makers
  • About
  • Contact
  • Advertise
Home » Wordpress Tutorials

Fix “Warning: Cannot modify header information” error

This entry was posted by nhc on Monday, July 14th, 2008 at 4:44 pm. It is filed under Wordpress Tutorials and tagged with wordpress error.

Did you encounter this error before when using Wordpress? I did. This morning, I decided to modify and clear some lines of code of Amazing Grace theme to make it lighter and lighter. Everything was fine (as my thought). I uploaded my modified files to ftp, browsed http://themelib.com and BOOOM!!! What’s it !?! An empty page with warning text appeared (looks like the Dead Blue Screen on Windows :( )

Warning: Cannot modify header information - headers already sent by (output started at /.../themelib.com/wp-content/themes/Amazing-Grace/functions.php:293) in /.../themelib.com/wp-includes/pluggable.php on line 694

Eh, what I’ve done? I can not remember! This is the time when Google becomes useful :D . After searching on internet, I found the solution to this problem so I thought I might as well write an entry, just in case we all encounter this in the future.

Introduction

This error happens when there are one or more spaces before “<?php” and after “?>”

Wordpress error - Can not modify header information

Wordpress error - Can not modify header information

Solution

The only thing you need to do is to clear all spaces before “<?php” and after “?>” and the warning will be gone (never return)

Advance

If the solution above do not solve your problem, this advanced section may useful.

Your .php file should saved under ASCII format. If you saved it under UTF-8 format, make sure the first 3 bytes Byte Order Mark (BOM) is deleted.

  • E-mail this story to a friend!
  • Print this article!
  • Digg
  • StumbleUpon
  • del.icio.us
  • Yahoo! Buzz
  • Technorati
  • Mixx

You've read the post. What's next?

If you like this post then please consider subscribing to our RSS feed. You can also subscribe by email to receive free updates directly in your inbox.

Want to know what am I doing? Follow me on Twitter!

Did you miss any of these related posts?

  • No related posts.

2 Responses to "Fix “Warning: Cannot modify header information” error"

  1. Aragao says:

    it is true that not understand a thing of Wordpress know that more errors so often appear in agreement the template! studying and practicing easy solutions views easy Then good luck

    Thanks to you my layout is getting pretty! Check out my blog by clicking on the link that takes my name:) but because of what happened with the skinpress not know if you can still help me, just have to make the imprint on Header become a link

    do with that also links the body of posts stand out, is as normal as the default

    Success and always! ;)

    Reply to this comment »
    July 14, 2008 at 6:58 PM
  2. Jason Woodcock says: Subscribed to comments

    I just wrote a little this morning on removing BOM from UTF-8 encoding php files whenever dealing with Wordpress themes.

    http://www.jasonwoodcock.biz/2.....e-warning/

    Reply to this comment »
    October 8, 2008 at 8:41 PM

Leave a comment

Click here to cancel reply.

RSS feed

Feedburner RSS feed
Most articles on this site are related to blogger templates, wordpress themes, blog design, tips, tricks, and plenty of fun :)

Grab the feed or enter your email address to get the party started! It is FREE.

Search our archives

Categories

  • Blogger Hacks
  • Blogger Templates
  • Blogger Tutorials
  • Blogger Widgets
  • Blogging Tips
  • Favourite Links
  • Google News
  • Make Money Online
  • Personal
  • Reviews
  • Site News
  • Web Stuff
  • Wordpress News
  • Wordpress Plugins
  • Wordpress Themes
  • Wordpress Tutorials

Archives

  • January 2009 (2)
  • December 2008 (17)
  • November 2008 (15)
  • October 2008 (15)
  • September 2008 (11)
  • August 2008 (26)
  • July 2008 (27)
  • June 2008 (16)

Entrecard Blog

Featured Links

  • Joomla Templates
  • Domain Name Registration
  • Slightly mordant
  • Your links here, $10/month

Top Commentators

  • Alex (3)
  • Typhoon (3)
  • brooks (2)
  • Jacques Seoman (2)
  • Make Money (2)

Recent Posts

  • Revolution Themes Became Paid Themes with GPL License!
  • eGamer Wordpress Theme for Video Game Bloggers
  • Google Pagerank Update December 2008 - ThemeLib is now PR6!
  • Viewport Wordpress Theme from Smashing Magazine
  • 50+ “your ad here” 125×125 banners
  • Merry Christmas Everybody!
  • Simple Text Premium Wordpress Theme
  • Wordpress Theme Reviews and Ratings at ThemesPreview
  • How to Find Spam Blogs Republish Your RSS Feeds and Make Good Use Of It
  • Woo Themes Christmas Special - Buy One and Get Three Free!

Popular Posts

  • Arthemia magazine blogger template (290)
  • Google PageRank update September 2008 - My blog got PR5 (108)
  • Maggo magazine blogger template (80)
  • Personal Mag magazine blogger template (66)
  • Astro colorful blogger template (62)
  • White Space blogger template (60)
  • Google Pagerank Update December 2008 - ThemeLib is now PR6! (57)
  • SunRays dark blogger template (40)
  • Windows Vista blogger template (39)
  • Rebel magazine blogger template (38)
  • Revolution Themes Now Available to Download - FREE (37)
  • Link love to Top Commentators :) (36)

Recent Comments

  • Typhoon:nhc posted this news almost a month back.I think you should subscribe to his fe
  • brooks:I am so proud that Google is giving such high PR's to websites
  • brooks:Being a gaming buff, I am so happy that wordpress has come up with this amazing
  • nhc:Search for the code below and change it. body { font-family: Century gothi
  • nhc:You can link to your favorite posts, blog's labels or something you like. It do
  • nhc:I'm sure you did something wrong with the template
  • nhc:Thanks. I'm dreaming of a PR7 too :
  • Yoginder:Thats a very good achievement. All the best and get a P7 or more :
Copyright
Links
© 2008 - 2009 ThemeLib. Some Rights Reserved. Arthemia Theme by MichaelJubel - Enhanced by ThemeLib
About Us | Contact Us | Advertise With Us | Hire Us | Terms of Service | Privacy Policies | RSS Feed | Email Subscription | Sitemap | Log In