jackhampson1 Posted August 25, 2011 Posted August 25, 2011 Hi , my sister has a game and when you click login and go to the authenticate page it says this : Warning: Cannot modify header information - headers already sent by (output started at /home/thedest1/public_html/hooligans-world.com/mysql.php:8) in /home/thedest1/public_html/hooligans-world.com/authenticate.php on line 45 Does anyone know how to fix this please? Quote
Rory_M Posted August 25, 2011 Posted August 25, 2011 I've been having the same error, thanks for this. :) Quote
Anonymous Posted August 25, 2011 Posted August 25, 2011 The clue is in the error (although I suspect somebody will no doubt contradict me on this): The key to solving it is to actually read the error/warning message: Warning: Cannot modify header information That is telling you that something as amiss, however it's also stating that it is only a warning, so it's not preventing the rest of the page from working as per normal. It's also a pretty clear indication as to the type of problem. headers already sent by (output started at /home/thedest1/public_html/hooligans-world.com/mysql.php:8) This is telling you that something has started sending headers from somewhere. Look in the specified file, look for anything before <?php or after ?> including but not limited to spaces, newlines, tabs, random characters etc. And finally this is telling you at what point the error was noticed. in /home/thedest1/public_html/hooligans-world.com/authenticate.php on line 45 At a guess, were you to take a close look at this file and line you would see the function session_start() The fix is to make sure that the mysql.php file has nothing prior to the opening <?php tag, and nothing after the closing ?> tag - ideally get rid of the closing tag, it's redundant. Quote
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.