I went to the admin panel and decided to change my theme. That is when all hell broke loose. I have tried re-insalling the database from a backup made last night before the error. I have tried putting up a completely new forum. Everytime I get this error. I know it has something to do with a mod for a website button but that button was removed a while back. I have lost my forum with an estimated 1,000 members and well over 25,000 posts. I thought I would just have to install the database but it seems like the error follows. Somebody PLEASE HELP I'm desperate. My tech support for my ISP doesn't work on the weekends either.
Below is the error when you go to my website: http://mywebsite/forum/index.php
Fatal error: Cannot redeclare show_websitebutton() (previously declared in /home/data/public_html/mywebsite/forum/Sources/Load.php(1735) : eval()'d code:565) in /home/wrong4/public_html/data/forum/Sources/Load.php(1735) : eval()'d code on line 581
Thanks anybody!
For help with your SMF forum you should ask at www.simplemachines.org/community/
That's true but when I leave a message there it isn't until the next day it is answered. I just figured that even though it isn't really a tiny portal problem that someone might have had a similar experience and could help me.
At least it was worth a try. I hope I can get someone over there today and soon.
THanks Ichin
dcmnorth,
There are a couple of SMF sites that show when I searched your error message.
You will have to register though and I do not know any details regarding the thread they discuss about the error.
http://www.google.com/search?hl=en&q=Fatal+error%3A+Cannot+redeclare+show_websitebutton%28%29&btnG=Google+Search
and here is a thread at SMF
http://www.simplemachines.org/community/index.php?action=profile;u=103131;sa=showPosts
I hope it helps.
"no mercy for the merciless"_Big Youth ;)
marzi
The error you have there usually means that you have duplicate code in one or more files.
Most likly you have the dupicates in the Load.php in the sources directory.
Open the file through FTP and look at the lines it gives the error from or search the file for
show_websitebutton()
And see if there is more them one line of the code.
Dear Marzi,
Thank you for the links. I registered with the first forum and it is my impression that even though they mention the error message they don't address the issue. It just doesn't seem like that kind of forum.
The second link I have seen before but it is mostly talking about the mod website button which by the way...I have had nothing but trouble with. It doesn't un-install easily. Thanks for the links but so far no help. But again I sure do appreciate it.
Dear G6,
When I follow the lines in Load.php this is what I get for
line 565= if (empty($temp))
Line 1734= {
Line 1735= $file_found = file_exists($filename) && eval('?' . '>' . rtrim(file_get_contents($filename))) !== false;
Line 581 = {
There is no mention of a website button anywhere in the Load.php file
Again, I know that this is asking more than is called for here but I ran a file called repair_settings.php
Instead of fixing the problem like it claimed it would
Now I get this error: Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@data.mywebsite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/1.3.37 Server at mywebsite.com Port 80
I was told by IchBin to seek help at the SMF community and I did. The only reply I got was "how much is this problem worth to you?"
I am just thankful that there are better people on this forum who seem to care about my issue.
Thanks again for being there even if we can't get my problem solved.
By the way I have a backup of the database but I get this error when I try to upload and restore:
Error
SQL query:
CREATE TABLE `smf_arcade_favorite` (
ID_FAVORITE int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
ID_MEMBER int( 10 ) unsigned NOT NULL default '',
ID_GAME int( 10 ) unsigned NOT NULL default '',
PRIMARY KEY ( ID_FAVORITE ) ) TYPE = MYISAM ;
MySQL said: FPRIVATE "TYPE=PICT;ALT=Documentation"
#1067 - Invalid default value for 'ID_MEMBER'
I don't know what statements to delete if any to make this thing work and have scoured the Internet for a solution.
My ISP will probably be no help monday as well...so without your help I am at a deadend.
Thank you for your kindness!
Instead of fixing this problem is there a way I can insert my database into a completely new forum?
I could upload all the mods after that...or is that just wishful thinking?
If it is possible a step by step process would be very helpful...
Unless I've already done all I can do.
Replace the Load.php with a frech file from the SMF full package.
Then use the Settings_bak.php and rename it to Settings.php (you have to rename the first Settings.php before you use the bak file)
Refresh and see if it come back up.
I have a hard time to think that his issue is all from a theme install only, you must have done something else to.
I was so excited to get your reply. I did exactly as you asked and this is now the error message I receive:
Fatal error: Cannot redeclare show_websitebutton() (previously declared in /home/data/public_html/mywebsite/forum/Sources/Load.php(1726) : eval()'d code:565) in /home/data/public_html/mywebsite/forum/Sources/Load.php(1726) : eval()'d code on line 581
It looks like at least I have the original error back.
I know I am being redundant but thank you for all your help. You always seem to help people...and I really appreciate it and need it.
awaiting your reply!
The only thing i would do at this point is to replace all the old files with new ones.
Just keep the settings.php file (back up it on your local PC) (remove the settings.php from the package as you have yours allready)
Then download and extract the full install package from SMF and upload/overwrite your files with the new ones through FTP.
Refresh and that should bring the forum to all defaults and then we go from there.
do I use the same settings to connect to the database or will it not ask me because I have the settings.php file already? Do I also install it in the same forum folder? and then re-name the old one?
I am doing what you have asked as I write this.
A little confusion...do you want me to keep the settings_bak that I changed the name of or do you want me to keep the settings that I changed the name to settingsold?
I have another forum that is working with fresh files set up for this occassion but I always get the same error when trying to connect to the database so I change the name of the database and I am good to go...only without any data. So can we still go from there?
I am also making a 3rd forum folder just in case so the files will be there if needed.
Keep both files backed up on your PC, you may need either or both. Open them in a text editor and check that the paths are correct to the SMF/TP file set that you wish to use.
The error strongly suggests that the problem is duplicate code in one of your files. How you overcome the problem to an extent depends on what time you have. The quickest will be to reload all the Source and default theme template files from an unzipped SMF package, this will overwrite all modification code and take you back to a basic SMF board. Once you have the board running you will then be able to reinstall mods, starting with TP. If you get any failures on the install test you can only proceed if you can add the required code yourself.
Incomplete uninstalls are the primary cause of 'Cannot redeclare' errors so if you get a fail on the uninstall check you must manually delete the code from that file otherwise when you reinstall you may get a pass but be duplicating what is already there.
Dear nokonium,
Thank you for your response too! This board rocks. I don't know if others have had some of the same problems I WAS having but SMF did not come to my rescue at any time.
Tinyportals on the other hand rose to the occassion and took on my problem.
G6 your patience with me and quick replies last night made it possible for me to finally go to sleep with an uncluttered mind. Your suggestion fixed the problem.
I am enternally grateful. Now I can go about putting back in my MODs one by one starting with Tiny portal.
I take it TP is not completely compatible with the SMF mod site so I will be more careful next time.
THANKS THANKS THANKS...
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.nokonium.plus.com%2Fblack-cat%2Fpeeps%2Fhat3.gif&hash=3c24d1237c6400a2d0a95d51ffa40069e70932e2)
Quote from: dcmnorth on July 22, 2007, 06:53:40 PM
I take it TP is not completely compatible with the SMF mod site so I will be more careful next time.
Call it as you will, but if the mod doesn't work with TP (
versus TP working with the mod) then I don't use it.
TP *IS* the backbone that my board depends upon. Everything else is supplemental to it. :coolsmiley:
Glad to see you're getting back to where you started...