corruption Posted December 4, 2006 Share Posted December 4, 2006 Warning: Cannot modify header information - headers already sent by (output started at /home/nukeu3/public_html/streetz-of-chaos/mysql.php:4) in /home/nukeu3/public_html/streetz-of-chaos/authenticate.php on line 24 can anybody tell me what this error means and how i can fix it? :? [email protected] Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted December 4, 2006 Share Posted December 4, 2006 Re: Warning: Cannot modify header information?? can't use header(), or setcookie() or any of the header tags before you output html. whats on line 24? Quote Link to comment Share on other sites More sharing options...
corruption Posted December 4, 2006 Author Share Posted December 4, 2006 Re: Warning: Cannot modify header information?? here is the ending of the code die("<h3>Error</h3> Invalid username or password! <a href=login.php>> Back</a>"); } else { $_SESSION['loggedin']=1; $mem=mysql_fetch_array($uq); $_SESSION['userid']=$mem['userid']; header("Location: loggedin.php"); } ?> line 24 is header("Location: loggedin.php"); i dont understand why all of a sudden this error pops up? iv never changed anything in the authenticate.php Quote Link to comment Share on other sites More sharing options...
rastus Posted December 4, 2006 Share Posted December 4, 2006 Re: Warning: Cannot modify header information?? I've sometimes had a error like that pop up after making a change, and not nessacarily to the page reported in the error. If you made any changes before this error poped up, undo the change and see if the error still occurs. Quote Link to comment Share on other sites More sharing options...
Revolution Posted December 4, 2006 Share Posted December 4, 2006 Re: Warning: Cannot modify header information?? Most of the pages contain data from other files, and changing one of these can change most (if not all of) the other pages. As said above, you've probably changed something linked (included) into that file Quote Link to comment Share on other sites More sharing options...
seanybob Posted December 4, 2006 Share Posted December 4, 2006 Re: Warning: Cannot modify header information?? since this is kinda on the subject... whats the difference between using header("Location: loggedin.php"); and <meta refresh content="0; loggedin.php"> ??? Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted December 4, 2006 Share Posted December 4, 2006 Re: Warning: Cannot modify header information?? some plugins/proxies can block it, i can block meta redirection with my firefox toolbar also, it stops loading at the header tag, so none of the page is loaded. if you put the meta thing in, it'll load all up until it, then re-direct. also even with 0 as the value its kinda slow :s Quote Link to comment Share on other sites More sharing options...
seanybob Posted December 5, 2006 Share Posted December 5, 2006 Re: Warning: Cannot modify header information?? ooo, okies thx :) Quote Link to comment Share on other sites More sharing options...
corruption Posted December 5, 2006 Author Share Posted December 5, 2006 Re: Warning: Cannot modify header information?? ok yesterday i reinstalled all the pages and it worked ok untill just a few minutes ago, im not sure exactly what the last thing i changed was besides the login page but i went back to the login page and i still got the same error lol is there any other pages or anything that connects or uses the login page that might have been effected? Quote Link to comment 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.