News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Fatal error: Cannot redeclare

Started by OverKiller_, June 11, 2013, 05:37:41 PM

Previous topic - Next topic

OverKiller_

Hi, I have an error when entering my site

"Fatal error: Cannot redeclare AdsCheckInfo() (previously declared in /home/u993130620/public_html/Sources/QueryString.php:545) in /home/u993130620/public_html/Sources/QueryString.php on line 585"

Please, help!

TheListener

Welcome to smf Overkiller

Which mods are installed on the forum.

Have you recently installed any mods?

It looks as though a mod has doubled its code twice in the file.


OverKiller_

Thanks!

Yes, i have installed "Add Social Media Icons" and "Add fb, like, tweet", but I think I got the error when installing "Add mod v3.1", which i deleted using FTP  :-\

TheListener

Did you uninstall it first?

Link to the mod?

OverKiller_

I installed it, then dont know why i repaired the MySQL Database, and then i got the error...so I finally uninstalled it, but the error is still appearing.

Mod: http://custom.simplemachines.org/mods/index.php?mod=255

What can I do?

TheListener

Where you downloaded the file was a little dropdown list called Parse.

This woulda given you the parse instructions for the mod.

http://custom.simplemachines.org/mods/index.php?action=parse

Have a look for the file which is causing the error then use the parser to correct the error.


Kindred

you have double installed one (or more) mods.
The ONLY way to recover, at this point, is to MANUALLY remove the duplicated code (and there is likely more duplicated than just the code which is giving the error)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

OverKiller_

And how I know what have to remove??

I parsed the mod but the error is still appearing, now has changed the line:

"Fatal error: Cannot redeclare AdsCheckInfo() (previously declared in /home/u993130620/public_html/Sources/QueryString.php:559) in /home/u993130620/public_html/Sources/QueryString.php on line 599"

Kindred

you "parsed the mod"?

Did you look at the code that the mod adds, and then go through each and every file which the mod edits in order to check for and remove the duplicated code?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

OverKiller_

Sorry, I mean that I have used the parser xD.

I looked for the file that is causing the error (querystring isn't it?), and then I used the parser to "correct" the file following the instructions of the the parse mod :/

Kindred

Quote from: Kindred on June 11, 2013, 06:14:50 PM
(and there is likely more duplicated than just the code which is giving the error)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

OverKiller_

And then? Maybe I can replace the entire "Sources" file to a new one? But where I can get it?

OverKiller_


Chalky

You can find clean files inside the large upgrade package, but please note that replacing your Sources folder with a fresh one will break any other mods you have installed that have also edited files in that folder.  If you have other mods installed it will be easier and cause fewer problems to simply locate and remove the duplicate code as Kindred said.  The parse instructions tell you which files were edited when you installed the mod, you just have to go through those files one by one searching for the code in question and removing any duplicates of the indicated code, not forgetting to keep a copy of each file as backup before you start editing.

Oh and please don't bump your topic in less than 24 hours.  We're all volunteers with real life commitments and in different time zones.  It's 1am here and I'm about to go to bed.

TheListener

QuoteIt's 1am here and I'm about to go to bed.

Early night?

OverKiller_

Thanks a lot ChalkCat, and sorry for the inconvenience  :-[

Regardless, i will replace the Sources file to a new one and I'll see what happens!

Thanks again and have a good night  :P

Chalky

Damn, I'm still here!  O:)

If you insist on doing that then please back up the whole thing first so you can swap it back again later or you could just end up with a bigger mess  ;)

Night night  :)

TheListener

Quote from: ChalkCat on June 11, 2013, 08:30:22 PM
Damn, I'm still here!  O:)

If you insist on doing that then please back up the whole thing first so you can swap it back again later or you could just end up with a bigger mess  ;)

Night night  :)

Has she gone yet?

:D :D

Good let's party.

OverKiller_


Chalky

Just seen this - what do you mean you're stupid?  :P  What happened?  Did you fix it???

OverKiller_

Yeah, I solved the problem, thanks!  :D

Chalky


Advertisement: