sh0wtym3 Posted December 17, 2009 Share Posted December 17, 2009 I can't figure out what headers are being sent before line 8 ? There's no whitespace before the <?php tag <?php session_start(); // Only Administrators have access to view this page $permissions = $_SESSION['permissions']; if ($permissions !== "Administrator") { $_SESSION['page'] = "welcome"; header("Location: /seo/"); die(''); } ?> Thanks in advance Link to comment https://forums.phpfreaks.com/topic/185486-help-cannot-modify-header-information-headers-already-sent-by/ Share on other sites More sharing options...
abazoskib Posted December 17, 2009 Share Posted December 17, 2009 It's not about whitespace. It's about output. Is there any other output before that code? Link to comment https://forums.phpfreaks.com/topic/185486-help-cannot-modify-header-information-headers-already-sent-by/#findComment-979276 Share on other sites More sharing options...
Mchl Posted December 17, 2009 Share Posted December 17, 2009 In your error message you should have information 'output started at ... ' See what's in the file/line it indicates. Link to comment https://forums.phpfreaks.com/topic/185486-help-cannot-modify-header-information-headers-already-sent-by/#findComment-979279 Share on other sites More sharing options...
sh0wtym3 Posted December 17, 2009 Author Share Posted December 17, 2009 It's not about whitespace. It's about output. Is there any other output before that code? Nope that is at the very top of the php file Link to comment https://forums.phpfreaks.com/topic/185486-help-cannot-modify-header-information-headers-already-sent-by/#findComment-979283 Share on other sites More sharing options...
sh0wtym3 Posted December 17, 2009 Author Share Posted December 17, 2009 In your error message you should have information 'output started at ... ' See what's in the file/line it indicates. Output started at line 10, here are lines 9-11: die(''); } ?> Once again the full code so you can put it into context: <?php session_start(); // Only Administrators have access to view this page $permissions = $_SESSION['permissions']; if ($permissions !== "Administrator") { $_SESSION['page'] = "welcome"; header("Location: /seo/"); die(''); } ?> Link to comment https://forums.phpfreaks.com/topic/185486-help-cannot-modify-header-information-headers-already-sent-by/#findComment-979284 Share on other sites More sharing options...
sh0wtym3 Posted December 17, 2009 Author Share Posted December 17, 2009 I think I figured out why there would be output, that code is part of 'pageB.php' which is nested inside of 'pageA.php' like so: <?php // Page A code blah blah blah require 'pageB.php'; // More page A code blah blah blah ?> The output is coming from page A so I know how to fix the problem, thanks for the assistance Link to comment https://forums.phpfreaks.com/topic/185486-help-cannot-modify-header-information-headers-already-sent-by/#findComment-979291 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.