Jump to content
MakeWebGames

Header Error


SMOKEY_TEK

Recommended Posts

I log in and I get this error for some odd reason.

 

Fatal error: Cannot redeclare microtime_float() (previously declared in /home/hitmanm1/public_html/header.php:12) in /home/hitmanm1/public_html/header.php on line 14

 

If anyone can help me with this much appreciated, I have no idea what I did to get this error.

Link to comment
Share on other sites

Another one where the error clearly states what the problem is and suggest how to cure it:

Fatal error

Somewhat self explanatory - the parser cannot proceed until action is taken to address this problem.

Cannot redeclare microtime_float()

Again should be obvious - Once a function had been declared, it cannot be redeclared

previously declared in /home/hitmanm1/public_html/header.php:12

That shows you where it is initially declared

in /home/hitmanm1/public_html/header.php on line 14

and where the attempt to redeclare it occurs.

Apart from a minor discrepancy in line numbers, it's apparent that the header.php file is being included twice. You need to examine closely each file to find out where it is including header.php (or other files which in turn include header.php).

From your htdocs (or public_html) folder:

grep -ril header.php *

will report the names of any files including header.php. (Decent editors often have similar capabilities these days if you are not command-line savvy).

Link to comment
Share on other sites

As you should know functions aren't usually just one line in length.

Saying to remove line x only would cause a syntax error, as you should know. It would also cause the script to execute in a manner not intended.

Then again, it is possible that two scripts are cross-including each other, which could also produce this error.

It's easy for the layman to assume everything is simple, but that's just not the case. To be proficient in what you do, you have to be able to think outside of the box for an answer to every possible question.

I have made a thread entitled "PHP Errors", which provides example errors with the most common causes.

Feel free to educate yourself with it.

Edited by Spudinski
Link to comment
Share on other sites

"The only pages I changed was my register, login, activate, forgotpassword"

You may of included the wrong header?

Login,register, any page with GRPG without a session needs nlheader.php and nlfooter.php

That's the only thing I can think of.

If you need more help PM your msn and I can try my best.

Link to comment
Share on other sites

Smokey that error just means that there are 2 Functions with the exact same name being used easiest way to find this out would be to open all the PHP files in notepad++ and do a search in all files for that name thats being declared twice if you get 2 results then you know 1 needs to be removed..

Link to comment
Share on other sites

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...