News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Fatal error: Cannot redeclare smf_main()

Started by cyberry, December 31, 2009, 08:52:39 AM

Previous topic - Next topic

cyberry

Hello,

I hope somebody can help me with this problem I have.
After a upgrade from version RC1 to RC2 I receive the following error:
Fatal error: Cannot redeclare smf_main()

Do somebody know what that means?

Thanks Roger

N3RVE

Duplicate function, what file is reported? Post the full error here.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

cyberry

Fatal error: Cannot redeclare smf_main() (previously declared in /www/htdocs/w00aa632/bfc/smf/index.php:159) in /www/htdocs/w00aa632/bfc/smf/index.php on line 706

:-[

N3RVE

Attach ./Index.php to your next reply.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

cyberry

It is the index.php from the updatefile....

N3RVE

The smf_main() function is not declared twice in that file. It shouldn't be reporting that error.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

cyberry


N3RVE

Looking at that error and looking at the file you attached, it's clear you've attached the wrong file. I'll advice you to get a copy of the Large Upgrade Package and use the index.php in the package.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan


N3RVE

Yes, use that (again). Use the Index.php file included the package.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

cyberry


cyberry

Now I have a new error:
Fatal error: Cannot redeclare template_main() (previously declared in /www/htdocs/w00aa632/bfc/smf/Sources/Load.php(2075) : eval()'d code:6) in /www/htdocs/w00aa632/bfc/smf/Sources/Load.php(2075) : eval()'d code on line 744
:o

N3RVE

Are you installing any mods after the large upgrade package? Are you sure the files are getting replaced?

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

cyberry

It looks like I have a problem with my template I used since it was a old template what is not working with rc2 anymore.
Is there a possibility to switch templates manually (not in the FRONTEND)?
This is the error I get now:

Fatal error: Cannot redeclare template_init() (previously declared in /www/htdocs/w00aa632/bfc/smf/Sources/Load.php(2075) : eval()'d code:32) in /www/htdocs/w00aa632/bfc/smf/Sources/Load.php(2075) : eval()'d code on line 532

I am getting there step by step  ;)

N3RVE

I don't understand, you mean after replacing *everything* on your server with fresh sets from the Large Upgrade Package, you still have those redeclare errors, that's impossible. I just downloaded the upgrade packages from all server, tested them and I don't have any error whatsoever. You are not replacing the files, simple.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

cyberry

Well, my board did run with the theme BK-SMF-Dark-20B4-v2 (before udating) but now it seems that this theme is not working anymore.

I did the update the board now via the upgrade.php and everything worked fine.
I deleted the upgrade.php and tried to get in the board but with no success. So I renamed one of my themes on the server (default) to the BK-SMF-Dark-20B4-v2 and it worked untill I did try to upload a new theme (Winter).
Now I always get this error i mentioned before.

I belive the upgrade would not run if something was not copied properly?

Any Ideas?

Best regards,
Roger

I guess I will go and drink some beer now and try to solve the problems tomorrow ( hopefully with your help)

Happy new year....


N3RVE

Post a link to your forum and a link to theme you're trying to use.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

cyberry

Hi,

this is one more problem I am not able to find the theme anymore....
Here is the link to the board: http://www.meeforum.bfcmassenbuch.eu/ [nofollow]

Oh you propably mean the new one: http://custom.simplemachines.org/themes/index.php?action=download;lemma=2021;id=11525

N3RVE

Honestly I don't understand how this is happening, you should *not* be getting those redeclare errors after replacing files with the Large Upgrade Package. Have you tried to delete everything in the SMF directory except Settings.php and re-upload the archive, also attach ./Sources/Load.php so I can take a look.

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

cyberry

I am redoing the upgrade and let you know when I am done

Advertisement: