Ell20 Posted April 4, 2008 Share Posted April 4, 2008 Hi, I keep getting this error on my script and I have no idea why: 0.010.01 Warning: Cannot modify header information - headers already sent by (output started at pointy/scpoints.php:239) in /pointy/scpoints.php on line 280 Warning: Cannot modify header information - headers already sent by (output started at pointy/scpoints.php:239) in pointy/scpoints.php on line 455 Line 280:}else{header('Location:pointsback.php');} Line 455: header("Location:../pointsback.php"); Appreciate any help Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/ Share on other sites More sharing options...
maexus Posted April 4, 2008 Share Posted April 4, 2008 http://www.phpfreaks.com/forums/index.php/topic,37442.0.html "HEADER ERRORS - READ HERE BEFORE POSTING THEM" It's stickied right at the top of the forum, in all caps. Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/#findComment-509635 Share on other sites More sharing options...
kenrbnsn Posted April 4, 2008 Share Posted April 4, 2008 Read the sticky note above Ken Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/#findComment-509636 Share on other sites More sharing options...
bryan52803 Posted April 4, 2008 Share Posted April 4, 2008 Because you're attempting to modify the header information after HTML (or otherwise content) is written. 1. Edit your post and remove the /home/... parts of the error; the less you reveal about your site file hierarchy the better. Knowledgeable people can do bad things with even the slightest hint of information like that. 2. Check your code before header() is called. Is anything echoed, printed, or otherwise output to the browser? This is your problem. Bryan Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/#findComment-509637 Share on other sites More sharing options...
Ell20 Posted April 4, 2008 Author Share Posted April 4, 2008 Nothing is output to the browser in the whole script. Im working on the IPN script for paypal. There is no white space and there is no HTML in the file at all. Cheers Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/#findComment-509641 Share on other sites More sharing options...
bryan52803 Posted April 4, 2008 Share Posted April 4, 2008 Please paste this line of code "scpoints.php line 239" (assuming there's no sensitive data) Note also that whitespace in any include's and require's will affect this as well Bryan Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/#findComment-509644 Share on other sites More sharing options...
kenrbnsn Posted April 4, 2008 Share Posted April 4, 2008 According the the error message output started at pointy/scpoints.php:239 it's saying that the output started at line 239 of the file pointy/scpoints.php That's where you have to look. Ken Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/#findComment-509645 Share on other sites More sharing options...
Ell20 Posted April 4, 2008 Author Share Posted April 4, 2008 Line 239 of scpoints.php is: echo $payment_gross; Thanks for the help Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/#findComment-509649 Share on other sites More sharing options...
kenrbnsn Posted April 4, 2008 Share Posted April 4, 2008 The echo statement is sending output to the screen. Ken Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/#findComment-509650 Share on other sites More sharing options...
Ell20 Posted April 4, 2008 Author Share Posted April 4, 2008 I just commented the line out as it was useless anyway. I think its fixed. Thanks for your help! Link to comment https://forums.phpfreaks.com/topic/99623-solved-warning-cannot-modify-header-information/#findComment-509651 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.