ConfusedCODER79 Posted October 27, 2010 Share Posted October 27, 2010 Hi! I'm not a very experienced PHPer. I keep getting this error... Warning: Cannot modify header information - headers already sent by (output started at /home/content/j/2/6/j26183102/html/referral.php:11) in /home/content/j/2/6/j26183102/html/referral.php on line 295 Any suggestions? It works on one server but not my customers godaddy hosting site. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/217011-header-location-problem/ Share on other sites More sharing options...
Pikachu2000 Posted October 27, 2010 Share Posted October 27, 2010 There's a sticky topic regarding this. It's titled: HEADER ERRORS - READ HERE BEFORE POSTING THEM Quote Link to comment https://forums.phpfreaks.com/topic/217011-header-location-problem/#findComment-1127124 Share on other sites More sharing options...
ConfusedCODER79 Posted October 27, 2010 Author Share Posted October 27, 2010 Ok I guess I seen this but it is way to far above me...I have no addtional spaces around the header so I was thinking it was something else. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/217011-header-location-problem/#findComment-1127128 Share on other sites More sharing options...
Pikachu2000 Posted October 27, 2010 Share Posted October 27, 2010 The very first thing in that script is html markup. That markup unconditionally gets sent to the browser immediately when the script loads. Any attempt to send any headers after that will fail and generate that error. Quote Link to comment https://forums.phpfreaks.com/topic/217011-header-location-problem/#findComment-1127132 Share on other sites More sharing options...
PFMaBiSmAd Posted October 27, 2010 Share Posted October 27, 2010 The error message tells you where the OUTPUT is occurring AT (or where the end of the output is at) that is causing the problem. Fixing this would involve eliminating that output or changing the logic to move the statement using a header() so that it is before any output is sent. Quote Link to comment https://forums.phpfreaks.com/topic/217011-header-location-problem/#findComment-1127135 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.