Well,
when I tried to access my forums, error message came up.
"Database Error
Please try again. If you come back to this error screen, report the error to an administrator."
Also, When I try To View Someones Profile
"Unknown column 'bg.name' in 'field list'
File: /home/FTPUSERNAME/public_html/Sources/Profile-View.php
Line: 399"
How do fix this? :S
smf version?
mods installed?
URL?
2.0.8
Plenty.
www.produo-gaming.tk
plenty is not a useful answer
Assuming your database connection information in Settings.php is correct, your issue would likely be due to a mod...
http://i60.tinypic.com/2mg8s1t.png
These are the mods installed.
well seeing as how I normally post form a mobile device, that is less than useful as well... Why can't you paste a list of the mods as text into a post?
Mod Name Version
1. @mention members 1.1.2
2. SimpleDesk - Integrated Helpdesk for Simple Machines Forum 2.0
3. User Control Panel By Alan S 2.2
4. Custom Copyright 1.0.4
5. Ultimate Profile 0.9.1
6. Downloads System 2.1a
7. Welcome Topic Mod 2.2
8. Button 1 Menu Extender for 6 custom buttons mod 1.0
9. Remove Help From Menu 1.0
10. Default Avatar 2.3
11. SMF Staff Page 1.7
12. Menu Buttons 1.1
13. Better Profile Menu 1.1
14. Group Color in Posts and Profile 1.4
15. Advance Fake Guests n Users Online (fguo) 1.0
16. Effectively Remove SMF Logo 2.0
17. 6 Custom buttons / tabs with Sub Menus (4) 0.5
18. MCLegendII RC1 3.0
19. Additional Membergroups on Profile 1.2
20. Alternate User Posting 1.0.1
21. SMFShop 3.3.1
22. Caps_Lock_Detection_on_Login 1.1.0.2
23. Stars to Profile
Well, I don't see anything obvious...
but I see that you have 3 mods that essentially modify the profile layout in the same areas...
3,5 and 13 in your list will probably conflict with each other.
you also have 8, 9, 12 and 17 which do the same sort of things...
I suspect that your database error may be related to one of those menu conflicts.
Well I was examining PHPmyAdmin and found this.
SMF_Ban_Groups
SMF_Log_Banned
SMF_Ban_Items
They are all erased. Would this be effecting the database? And how can I fix it.
I'm noobish when It comes to these.
Here's a picture
(http://i61.tinypic.com/1z3a1xl.png)
The mods that you have... Did you recently install one?
Or, did you do anything else, just before this error manifested itself?
No.
But one of our admin accounts was cracked tho but he has only changed the usergroups and all, nothing else.
And Could It Be The PHPmyAdmin? Cause I deleted the rows. I know, stupid of me.
EEK! Got a backup you could import those from?
Not really and none were banned too. :"(
Heck... OK. When this started happening, something must've been done, just beforehand. Like, say, a mod got installed? Something like that.
Any ideas? That 'bg.name' thing is from a mod. Which one, is gonna take a lot of detective work... I'd assume, logically, that it was the last one (Or near as dammit).
Is there a way to fix this?
I removed the ones which customizes the profile menu. Nothing changed. :"(
If your host doesn't have a backup, the only thing that I can think of, at the moment, is this:
http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Well, If I setup a new file and link the database to my old one, would all the members and stuff remain?
Although that page has been severely butchered, since I wrote it, this is still there:
QuoteOnce done, your forum will be in a virgin state, software-wise. All of your members, posts, etc. will be intact. However, none of your mods will be installed now. They will, fortunately, still be in Package Manager. From there, you can either apply/install them, or delete them, as you desire. Any of your mod's settings that are stored in the database will be retained and still be usable when the mod is reinstalled.
:)
So, I can do that and I wont lose anything (Members, Topics, Boards. etc ) except mods?
Or am I being stupid again? P:
PS;- Just making sure cause I don't want to regret this. P:
You've got it. :)
As it says, the mod'll still be there, in Packages. They'll just need to be reinstalled. But, anything "Database", to do with mods, will still be there, too. So, not many should need configuring, after they're installed.
QuoteDownload the large upgrade package for the exact version of SMF that you're using from the download site. Be sure to select your current version of SMF from the drop-down list next to "Select Version".
Well, I chose 2.0.8 From the drop down list. But there aren't files for that version.
What do I do? :S
I think you must be looking in the wrong place. :(
Here's the 2.0.8 large upgrade.
http://download.simplemachines.org/index.php?thanks;filename=smf_2-0-8_upgrade.zip
It's on this page:
http://download.simplemachines.org/
I wouldn't say that the page was butchered, K@... looks like it was cleaned up and more detailed information added :D
As discretion is the better part of valour...
(http://www.katzy.dsl.pipex.com/Smileys/lipsrsealed.gif)
;)
Nothing changed except that I have another error now!
Fatal error: Call to undefined function get2by2host_copyright() in /home/FTPUSER/public_html/Sources/Load.php(2151) : eval()'d code on line 294
Got a backup tho
well.... your obviously did NOT load a full set of clean files... because that error is due to a mod which (since presumably SOME of the files were replaced) is not missing the rest of its code.
Did it again.
No changes.
OK... That "eval" thing could be playing tricks on the error message.
Go to Admin>Config>Server settings and "Disable evaluation of templates".
That should show you the real error.
Done
Now its:-
Fatal error: Call to undefined function get2by2host_copyright() in /home/FTPUSER/public_html/Themes/relax/index.template.php on line 294
Ah. When you uploaded a new set of files, you didn't upload a new set of files for that theme.
If you switch to the SMF default theme, everything should work.
Then, you can go to Admin, delete the theme, then install a virgin copy.
Or, you could attach a copy of the theme's index.template.php to your next post and we can remove the offending section of code. (Or, of course, you could do that, yourself. :)
If you have other themes, they might have the same problem...
As it happens, I can see your forum. http://www.produo-gaming.tk/index.php
But, the error appears, at the bottom.
I'll do that tomorrow, cause i'm awfully tired right now...
As of now,
I just added one more error to my forums. You sure the solution stated above will fix all the 3 errors which are as follows:-Quote from: andrewill on August 18, 2014, 02:14:48 PM
"Database Error
Please try again. If you come back to this error screen, report the error to an administrator."
Quote from: andrewill on August 18, 2014, 02:14:48 PM"Unknown column 'bg.name' in 'field list'
File: /home/FTPUSERNAME/public_html/Sources/Profile-View.php
Line: 399"
Quote from: andrewill on August 20, 2014, 04:14:29 PM
Fatal error: Call to undefined function get2by2host_copyright() in /home/FTPUSER/public_html/Themes/relax/index.template.php on line 294
well, you don't get the first two errors any more, do you?
I do.
even after you loaded a clean version of your custom theme?
Seriously... there is no way that ANY of those errors will happen if you actually loaded a fresh set of files for both SMF and your theme.
I managed to get rid of the theme error, but the rest still remain.
"Database Error
Please try again. If you come back to this error screen, report the error to an administrator."
Is that all the time? Or, is it intermittent?
I'd try this, if I got that error:
http://wiki.simplemachines.org/smf/Repair_settings.php
Although, quite what you did, to screw the database conection, I couldn't even begin to speculate upon...
Unknown column 'bg.name' in 'field list'
File: /home/FTPUSERNAME/public_html/Sources/Profile-View.php
Line: 399"
"bg.name" only appears in a virgin Profile-View.php file, in one place, on line 207. So, did you really upload a full set of files?
K@,
it is unlikely that repair_settings will fix this.
The database error occurs mid page, not at the page load... which means that some mod is attempting a database call within his template -- (which is wrong to begin with)
Hence my continuing statement that he has not actually loaded a clean set of files.
"Database Error. Please try again. If you come back to this error screen, report the error to an administrator." made me think that he might've got the database details screwed, somehow.
How, I couldn't even begin to speculate. But, I have to say, a lot of what's gone-on, here, has been a bit... well... weird.
I have tried repair_settings.php
And NOWPE, nothing changed. :S
Quote from: K@ on August 21, 2014, 10:01:10 AM"bg.name" only appears in a virgin Profile-View.php file, in one place, on line 207. So, did you really upload a full set of files?
If I go to http://www.produo-gaming.tk/index.php I get the error.
BUT... If I go to http://www.produo-gaming.tk/index.php?theme=1 I can get in.
Yes, people who registered can access the forum in this way.
1. Open my website.
2. Close the window tab once you get the error.
3. Open a new tab and login again.
If thats done, it'll work.
But, people who would like to register on my web and post, etc can't. They get the error on the 2nd stage of registration.
========================================================================
Quote from: K@ on August 21, 2014, 11:57:56 AM
Quote from: K@ on August 21, 2014, 10:01:10 AM"bg.name" only appears in a virgin Profile-View.php file, in one place, on line 207. So, did you really upload a full set of files?
If I go to http://www.produo-gaming.tk/index.php I get the error.
BUT... If I go to http://www.produo-gaming.tk/index.php?theme=1 I can get in.
YES, I did upload the file on the link you gave me. It doesn't change anything.
OK. Just to make sure that we haven't got our wires crossed...
You got this:
http://download.simplemachines.org/index.php?thanks;filename=smf_2-0-8_upgrade.zip
You dearchived that, into an empty directory.
You uploading all of the files, to your forum, overwriting what was there.
Yes?
attach your index.template.php from your theme
Quote from: K@ on August 21, 2014, 12:31:07 PM
OK. Just to make sure that we haven't got our wires crossed...
You got this:
http://download.simplemachines.org/index.php?thanks;filename=smf_2-0-8_upgrade.zip
You dearchived that, into an empty directory.
You uploading all of the files, to your forum, overwriting what was there.
Yes?
Not all, I removed the upgrade.php and the upgrade SQL files
===========================================================================
Pastebin:- http://pastebin.com/THaRrzqn
removed the code...
please attach the file to the next message.... not paste the contents...
Ah, Snap, Sorry! P:
Here you go.
ummmm... why did you delete your original post and then repost the exact same thing?
A bump. I noticed:- File Download 0 Times.
please don't do that.... I'll take a look when I get to a real computer - unless someone else looks first... but bumping like that is rude...
Alright mate, sorry 'bout that.
Bytheway, Could you find a solution to this? I know I'm hurrying you and I shouldn't ask you this, but it's cause I don't want my Gameserver to lose players due to this. :/
I don't see anything obvious... what about boardindex.template.php
Where do I locate that?
probably in your custom theme directory as well -- if not there (and ONLY if it is not there) look in the default theme directory
Not there.
This is the one from Default.
Mind if i bump? :P
I have been unable to download that attachment. My virus scanner seems to think it is infected...
What's puzzling me, is the weirdy that gets me in, if I use http://www.produo-gaming.tk/index.php?theme=1
As you've set things so that members can't switch to the default theme, I'm trying to figure out how that error's not appearing on the page, now, either, when I use that URL.
Once I've been on the page, I can open a new tab and go to http://www.produo-gaming.tk without any problems.
That makes me wonder... I don't see how, at all. But, logic says that the only thing that could make it do that, is something that gets stored on my computer. The only thing that that could be, unless I'm missing something, is the cookie. I really don't see how that could affect the database, unless the error messages have become screwed, somehow.
So, humour me, would you? If you get get into your admin panel, can you try changing the cookie name, in Configuration>Server settings? If you can't get in, to do that, I guess you could edit Settings.php.
$cookiename = 'SMFCookiez'; # Name of the cookie to set for authentication.
and/or, empty the forum cache?
Done.
It doesn't change anything at all. :/
+ I really don't care about the Profile error cuz I can get back to that later.
I just want people able to register.
http://www.produo-gaming.tk/index.php?theme=1 isn't working, now, either... EDIT: Oh, wait. It does after a second attempt...
OK. You got hacked. You deleted some rows, in the database...
As I could get in, yesterday, I'm hunching (Is that a word?) that the database is OK, other than the profile error.
Are you 100% certain that the files haven't been edited, in some way?
If I was in your position, I think I'd backup, now (I know. Closing barn door after horse has escaped, but...), and do this:
http://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
As it says, in that page, "Once done, your forum will be in a virgin state, software-wise. All of your members, posts, etc. will be intact. However, none of your mods will be installed now. They will, fortunately, still be in Package Manager. From there, you can either apply/install them, or delete them, as you desire. Any of your mod's settings that are stored in the database will be retained and still be usable when the mod is reinstalled."
If you still get hassles, you have that backup that you could restore and investigate further.
For info on how to backup, click my sig.
k@... he's already done that -- or at least that's what he tells us he has done.
That's why I was asking for the files, because it seems that his load of fresh files did not fully work...
How on Earth did I miss that?!?!?!
This is weird.
http://www.produo-gaming.tk/index.php?theme=1 definitely works, even though it doesn't switch the the fefault theme.
Maybe the theme hasn't had a virgin copy put on? Maybe that has some hacked files in, still?
Well, Let Me Explain Now.
Uhm..
After one of our admin account was cracked and my IP was banned. Stupidly, I deleted few rows and the ban database resulting in the Database error along with the profile error.
Then I posted this topic seeking support.
I have backed up my files, and uploaded a fresh set of files like you asked me to.
Still, no changes. I have posted a picture of my Database table in about the first or second page of this topic.
Did you upload a new set of files, for the custom theme, though? If not, they MIGHT be infected with something.
If you switch to the default theme (which we can't do, coz you won't allow it), does the error go?
deleting rows in the ban table - while not recommended - would not have resulted in your issues.
your error is due to CODE, not the the database itself.
Quote from: K@ on August 27, 2014, 01:22:09 PM
Did you upload a new set of files, for the custom theme, though? If not, they MIGHT be infected with something.
If you switch to the default theme (which we can't do, coz you won't allow it), does the error go?
Yes, I have.
And No...I Just Changed The Theme To Default...Error Still Appears.
Can you get in, if you go to http://www.produo-gaming.tk/index.php?theme=1 ?
You might have to go twice.
Yes I can in the first attempt.
That is just sooooo weird, though, innit?
I can't get into plain old http://www.produo-gaming.tk no matter how many times I try.
I'm just off to bed, now. I'll have a think, overnight, coz this is just totally illogical and I have a niggling feeling that I'm missing something really obvious...
Hang on... I just noticed something...
Quote from: andrewill on August 21, 2014, 12:23:48 PM
YES, I did upload the file on the link you gave me. It doesn't change anything.
Did you run it? Or, just leave it there? (Best to check).
Ugh. I didn't run it.
I uploaded it and done :P
How do i run it now? :S
It tells you, here:
http://wiki.simplemachines.org/smf/Repair_settings.php
:)
Oh ... I did that . :P
All paths/settings A-OK?
Weirdness...
Now I Get This
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.
That suggests that the username's wrong, the password's wrong, the database name is wrong, or your host's server's down.
When did that start happening?
2 Hours Ago..
And I havent changed anything.
Sorry. I meant "When" as "What was done, just before this started happening".
Let's wind back, a bit... Did you run the repair settings thing? Were the database details correct?
That was a while ago..
This error appeared today. I havent even opened my forums today and I got to know about this cause a member of my gameserver reported this as a 'bug'.
I'm pretty sure I didnt change anything at all
Well, if the settings I mentioned, above, are right, it might be best to have a word with your host.
Also, I was wondering If I could change my website without losing my users and topics?
I mean Imma register a new domain, and I wanna restore my old forums to it without losing anything.
Is this possible?
PS:- I have a backed up .rar file but I can't find it in my windows. Do you know how its named?
Yes, it's quite easy, really. But, you need the database. Everything else can be rebuilt, from scratch, if required. Not the database. You MUST get that. If you can get the software backed-up, too, so much the better.
For details on backing-up and restoring, click my sig. There's a page on the wiki about moving hosts/domains, too, I believe.
Your backup will be a tar/gz (.tgz or .gz), or a zip. I've never seen a rar backup, thus far. (That doesn't mean it can't happen, of course. But, tar, gz and zip are in the public domain. I believe rar is still proprietary).
Depending on how you backed-up, the file might well be named "backup blahblah.gz".
I found and extracted my backup file, now I have a .sql file.
Where do I upload that?
It tells you, on the page you go to, when you click my sig.
http://wiki.simplemachines.org/smf/Backup#Restoring_your_database
:)
And....
Quote1. Look for the section labeled "Databases".
2. Under that heading, you'll find "phpMyAdmin".
3. If you click that, you'll see a page that might, at first, seem somewhat scary.
4. It IS. Be careful what you do, there, because you can SERIOUSLY break things.
5. Look at the left-hand pane and you'll see the name(s) of your databases.
6. Click on one of them and you'll taken to another scary page.
7. On there, you'll see some tabs, along the top. The one you want is labeled "Export".
8. When you click on that, you'll get yet another page.
9. Under "View dump (schema) of database", you'll see "Export".
10. Just below that, click "Select all".
--------------------------------
EDIT:- Never mind, I selected all from the home page and exported it.
11. At the bottom of the page, ensure that "Save as file" is checked.
12. Then, click "Go".
---------
So I open a random database on the left hand side of phpMyadmin. The random table was smf_approval_queue.
After its page opened up, I clicked export.
10. Just below that, click "Select all". >> I Don't See A "Select All"
And When I Save It I Get A .sql of that particular table.
ISn't there a way to get all in one?
Go to cPanel and look for the section labelled "Files". Click on the "Backups" icon.
In the new page that opens, you'll see "Restore a MySQL Database". Click "Choose" to navigate to your database backup, then "Upload" to start the restoration.
That does the entire database, which is what that sql file is.
When it's in place and the software's there, you'll need to do this:
http://wiki.simplemachines.org/smf/Repair_settings.php
Ugh.
There's no restore button
Sorry... "Upload".
Nowpe!
Will it be the same effect if I do it through phpMyAdmin after installing SMF?
Yeah. You can import the entire database, from there, too. Details are on that same page of the wiki.
Well, All's Good!
Only That I lost All My Members And Topics :/
Any way to fix this?
Did the tables messages, topics and members not import? When you look in the database is something actually in them.
Sounds like you might not have managed to upload them.
It did.
New Forums:- www.la-crp.tk
If the database imported as you said this this should not be happening. Are you sure you have your SMF pointed to the correct database?
Members Are Restored. Phew!
But the topics aint.
have you tried recounting all totals and statistics and running the repair function?
well, look in the new database.
What does the smf_messages table look like?
Its empty.
Btw, I have over a 100 users. But in the statics near the "Who's online" it says 4. (The 4 New Registered)
Then either your backup did not import or you have set your SMF up to use the wrong database.
Alright. I did it again.
Now it appears on the forums that the topics exist, but it really doesn't.
You can see what I mean here:-
www.la-crp.tk
can't access the site without a login....
also - check the message table again... if the topics are there but the messages are not, then you got the topics table uploaded, but not the messages table
(http://i61.tinypic.com/f2k8s7.png)
Quote from: Kindred on August 30, 2014, 03:16:47 PM
also - check the message table again... if the topics are there but the messages are not, then you got the topics table uploaded, but not the messages table
Which is....
smf_messages and?
smf_topics
All Good.
Last question. My Admin Status Was Removed, How Do I Restore It?
http://wiki.simplemachines.org/smf/Administration_-_I_accidentally_lost_my_admin_account!_What_can_I_do
And That Does It. <3 Thank you.
WoOt! :)
Glad we got there, in the end.
my HOST pointed me to this when i got the dreaded "Database Error" > http://php.about.com/od/mysqladministration/qt/repair_mysql.
aegersz,
this post was 2 years old...
additionally, repair only works if the database has a broken table... in most cases, (as in this case) the database error is something else entirely -- and the repair would do absolutely nothing.
Quote from: Kindred on July 23, 2015, 09:19:44 AM
aegersz,
this post was 2 years old...
additionally, repair only works if the database has a broken table... in most cases, (as in this case) the database error is something else entirely -- and the repair would do absolutely nothing.
i see. i had it once and i restored the database. but it haunts me. thanks.