phpBBHacks.com - Warning: Cannot modify header information...
DeveloperCube, a community for webmasters and web developers
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Add Us:     MySpace     Facebook     StumbleUpon
Username:    Password:
Remember Me?    
Warning: Cannot modify header information...
BlinkList
del.icio.us
Furl
linkaGoGo
reddit
Simpy
Mister Wong
Yahoo! My Web

Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Troubleshooting
 See a User Guidelines violation? Please contact us.
Author Message

JohnMcK
Dedicated User

Joined: 07 Apr 2003
Posts: 3861
Location: Quakertown, PA

PostPosted: December 6th 2003, 9:38 pm    Post subject: Warning: Cannot modify header information... Reply with quote

phpBB wrote:

Warning: Cannot modify header information - headers already sent by (output started at /path/to/file/filename1.php:z) in /path/to/file/filename2.php on line xxx


This is a very common error message and one that is usually very easy to track down and fix.

The error is generally the result of extraneous characters before the start of your php files. Make sure there is nothing, not even spaces before <?php or after ?>. These should be the first and last lines of your PHP files, respectively.

Example: Incorrect php file
Code:

    <?php

echo "This php file will trigger the Cannot-modify-header-information error.";
echo "Note the extra spaces before the <?php.";
echo "There are 4 of them, but you don't want even 1.";

?>


Example: Correct php file
Code:

<?php

echo "This php file will NOT trigger the Cannot-modify-header-information error.";
echo "Note the evil extra spaces before the <?php have been removed.";

?>


To find and fix this error, check the files mentioned in the error message, particularly the file I've highlighted in red in the example above. Remove any extra characters that appear before <?php or after ?>.

Thanks to A_Jelly_Doughnut for catching my omission.

John McKernan (JohnMcK)
_________________
Retired phpBBHacks.com Support Team Member
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2: Troubleshooting All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB.it - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil

Network: iFroggy Network Blog - iFroggy Hosting - SportsForums.net - KarateForums.com - YanksBlog.com - PhotoshopForums.com - DeveloperCube - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - DrGregHouse.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Staff - User Guidelines >

Copyright © 2001-2009. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. Hosted by 100MegsWebHosting. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.