Jump to content
MakeWebGames

Recommended Posts

Posted

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?

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...