newrehmi Posted February 23, 2010 Share Posted February 23, 2010 hellow all, sorry if this kind of topic already discussed for many times. I am just troubleshooting my problem to the root of it, and still can't find the answer. so this is my code, without <html> tags or whatsoever. Just this in my test.php. <body><?php header("location: index.php");?></body> and when I open the test.php, it gave me those "Cannot modify header information - headers already sent by... blabla bla" but, when I remove the <body> tag, it redirect normally. I already do those outputbuffering=on and still having the same problem.. May someone list a what is my actual problem? Thanks so much in advance! Quote Link to comment https://forums.phpfreaks.com/topic/193091-troubleshooting-cannot-modify-header-information-headers-already-sent-by/ Share on other sites More sharing options...
KevinM1 Posted February 23, 2010 Share Posted February 23, 2010 See: http://www.phpfreaks.com/forums/index.php/topic,37442.0.html Quote Link to comment https://forums.phpfreaks.com/topic/193091-troubleshooting-cannot-modify-header-information-headers-already-sent-by/#findComment-1016863 Share on other sites More sharing options...
developerdave Posted February 23, 2010 Share Posted February 23, 2010 A header cannot be changed once any output has been started. It will shout at you otherwise Quote Link to comment https://forums.phpfreaks.com/topic/193091-troubleshooting-cannot-modify-header-information-headers-already-sent-by/#findComment-1016868 Share on other sites More sharing options...
jay7981 Posted February 23, 2010 Share Posted February 23, 2010 See: http://www.phpfreaks.com/forums/index.php/topic,37442.0.html Quote Link to comment https://forums.phpfreaks.com/topic/193091-troubleshooting-cannot-modify-header-information-headers-already-sent-by/#findComment-1016887 Share on other sites More sharing options...
jl5501 Posted February 23, 2010 Share Posted February 23, 2010 The most important part of that error msg is where it says output started at ... that will tell you where your issue is Quote Link to comment https://forums.phpfreaks.com/topic/193091-troubleshooting-cannot-modify-header-information-headers-already-sent-by/#findComment-1016939 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.