Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDean Kennedy
4,491 PointsCannot modify header information on deployment server.
I have deployed an application to a web server & am getting errors I don't get on my development environment. The error is: Warning: Cannot modify header information - headers already sent by (output started at /sl.ls5cpf.co.za/includes/functions.php:6) in /sl.ls5cpf.co.za/login.php on line 12. Any ideas on how to fix this?
1 Answer
Joel Bardsley
31,249 PointsUsually this warning appears because of a whitespace issue - check those files for any spaces/empty lines before your opening <?php tags and after any closing ?> tags and remove if necessary. Your deployment server might have different error reporting settings applied, which I would speculate is why you're not seeing the same message in your dev environment.
If that doesn't fix the issue, please post the relevant lines of code from those two files if possible.
Dean Kennedy
4,491 PointsDean Kennedy
4,491 PointsThanks Joel, was white space on the functions file