Database Error

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
KBowz
Registered User
Posts: 5
Joined: Thu Apr 06, 2006 9:45 pm
Contact:

Database Error

Post by KBowz »

I don't know what happened, but nobody, not even admins, are able to log into my forum. When I try, I get the error:
Error in obtaining userdata

DEBUG MODE

SQL Error : 1054 Unknown column 'user_login_tries' in 'field list'

SELECT user_id, username, user_password, user_active, user_level, user_login_tries, user_last_login_try FROM phpbb_users WHERE username = 'kbowz'

Line : 65
File : login.php


I talked to my webhost and they were unable to help me. I deleted the entire forum and created a new one, then restored from a SQL backup that was working when I ran the backup, and still get the error. I don't want to loose the data in the forum. What can I do to repair this?
User avatar
Black Fluffy Lion
Former Team Member
Posts: 6057
Joined: Sat Dec 15, 2001 11:37 am

Post by Black Fluffy Lion »

Have you recently upgraded? The problem is that your database structure is not up to date. The login.php file is expecting a user_login_tries column to exist in your database, but it doesn't.

The easiest way to create the column is to download a copy of phpBB and then upload just the install/ directory. Then, in your browser run the install/update_to_latest.php file, before deleting the install/ directory. everything should be dandy after that.
KBowz
Registered User
Posts: 5
Joined: Thu Apr 06, 2006 9:45 pm
Contact:

Post by KBowz »

err...

You lost me a little there.

My BBoard gets automatically installed from my web provider's control panel. I have access to the website directory structure as the webmaster, but I am not sure that I know how to go about doing that.

Could I get a little more info on how to do that please?
User avatar
Black Fluffy Lion
Former Team Member
Posts: 6057
Joined: Sat Dec 15, 2001 11:37 am

Post by Black Fluffy Lion »

Did you do anything to your forum just before this error started occurring? Because it is usually the result of an incomplete upgrade. Am I right in thinking that you have not uploaded a new version of phpBB recently? If so then your host must have changed the files without making the required database changes.

You say that you have access to your file structure; does this mean you know how to upload a file to your webspace? :)
KBowz
Registered User
Posts: 5
Joined: Thu Apr 06, 2006 9:45 pm
Contact:

Post by KBowz »

Yes, I can manually change my website files thru FTP. I don't fully understand the BB however, and rely on it working thru the admin tools provided by my webhost. If there are updated files that can be copied over previous files, I may be able to do that, however, I don't have access to the actual server to run any programs myself.

I also have a backup (CSV?) that was generated a while ago. It was working when I ran the backup. If my webhost updated the BB files it would have been without my knowledge. How can I make the DB changes?

I might be able to edit the backup (it's appears to be a text/csv/sql file) if I knew what to look for to make the changes.
User avatar
Black Fluffy Lion
Former Team Member
Posts: 6057
Joined: Sat Dec 15, 2001 11:37 am

Post by Black Fluffy Lion »

Don't worry about the old backup. You can keep the database that was on your forum when the error started (assuming that's the data currently in your database, or that you have a backup of it).

So, upload your most recent backup (or don't upload any backup at all if the database online at the moment is your most recent).

Then, to make the database changes, download the phpBB 2.0.19 full package. Upload only the directory called install/ to your webspace, so that it is inside your phpBB folder (i.e. at the same level as viewtopic.php). Then go to http://www.yourforumurl.com/forum/insta ... latest.php in your browser. lastly, delete the install/ directory from your webspace :)
User avatar
Black Fluffy Lion
Former Team Member
Posts: 6057
Joined: Sat Dec 15, 2001 11:37 am

Post by Black Fluffy Lion »

Gah, a new version, 2.0.20, has just been released. You might as well follow the above instructions anyway to complete the upgrade to 2.0.19 first (just download phpBB 2.0.19 from here instead). But then after that you'll have to upgrade to 2.0.20. it seems your host updated your files for you last time, so you should contact them to see if they are planning to upgrade your installation for you or not.
KBowz
Registered User
Posts: 5
Joined: Thu Apr 06, 2006 9:45 pm
Contact:

Post by KBowz »

Thank you - that did the trick. I guess I should have come here first, I thought I had to go thru the webhost and that wasn't getting me anywhere.
Locked

Return to “2.0.x Support Forum”