Forum Critical Error!!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
FinalAeon
Forum Newbie
Posts: 17
Joined: Sat Aug 02, 2003 2:51 pm
Location: ATL, GA

Forum Critical Error!!!

Post by FinalAeon »

Hey, I had got my forum working great and it worked for about a week and i didn't messaround with anything so i souldn't mess anything up. But one day when i woke up and wanted to check my forum on my site, i got this error:

-------------------------------------------------------------------------------------

phpBB : Critical Error

Could not obtain lastvisit data from user table

DEBUG MODE

SQL Error : 1016 Can't open file: 'phpbb_users.MYI'. (errno: 145)

SELECT * FROM phpbb_users WHERE user_id = -1

Line : 62
File : /home2/fearmysk/public_html/forum/includes/sessions.php

-------------------------------------------------------------------------------------

I am using phpBB v2.06 from http://www.phpbb.com

Thank you,

FinalAeon :oops:
evilMind
Forum Contributor
Posts: 145
Joined: Fri Sep 19, 2003 10:09 am
Location: Earth

Mysql can't open file

Post by evilMind »

Sounds to me like it could be a corrupt table. try "repairing" the table. IE,

Code: Select all

REPAIR TABLE `phpbb_users` EXTENDED;
or

mysqlcheck --auto-repair -m DATABASENAME tables
where DBNAME = the name of the database
tables = comma seperated list of tables you want to check (optional, don't include tables for mysqlcheck to check all tables w/in the specified db)
*Note* if -m doesn't work then try -e (this will take longer though)

Should do the trick if the table is in fact corrupt. What os + filesystem are you using?
FinalAeon
Forum Newbie
Posts: 17
Joined: Sat Aug 02, 2003 2:51 pm
Location: ATL, GA

Post by FinalAeon »

Umm, can you tell me what to do with that code you sent me? I don't know what to do with it or where to put it... :oops:

Thank you,

FinalAeon
evilMind
Forum Contributor
Posts: 145
Joined: Fri Sep 19, 2003 10:09 am
Location: Earth

code

Post by evilMind »

The REPAIR TABLE.... code should be run from a msyql> prompt.
ie, log in to mysql as a user who has permissions to modify those tables, and then run the REPAIR TABLE... code.

the mysqlcheck can be run from the command line like this (I believe in both *nix and Windows):

Code: Select all

mysqlcheck -m --auto-repair -u SomeUserName -p DATABASENAME tables
once again, where:
SomeUserName = user who has priviliges to modify the database/tables in question.
DATABASENAME = the name of the database you are trying to repair
tables = comma seperated list of tables to check

Another example, (I tend to be confusing at times esp. when I try to be clear with what I"m saying)

Code: Select all

mysqlcheck -m --auto-repair -u myUser -p mydb table1,table2,table3
FinalAeon
Forum Newbie
Posts: 17
Joined: Sat Aug 02, 2003 2:51 pm
Location: ATL, GA

Post by FinalAeon »

Well i have webhosting from ionhosting.com and they give my mysql admin or something like that i know for sure, but i can't seem to find where the command prompt is. The only place i would think of looking is in the control panel right? but i dont see it there... if you could guide me and tell me exactly what to look for it would be very much appreciated.

Thank you,

FinalAeon :oops:
evilMind
Forum Contributor
Posts: 145
Joined: Fri Sep 19, 2003 10:09 am
Location: Earth

Post by evilMind »

if it's phpMyAdmin that you are using (and that would be my guess since ion uses cpanel which is the same thing as the site I help maintain)

*You should see a list of tables on the left.

*Click on the table name (in this case phpbb_users).

*You should now see a row of tabs at the top .. possibly -> Structure, Browse, SQL, Select, Insert, Export, Operations, Empty, Drop.

*Click on Operations

*Scroll down to where you will see table maintence and click on "Repair Table"
FinalAeon
Forum Newbie
Posts: 17
Joined: Sat Aug 02, 2003 2:51 pm
Location: ATL, GA

Post by FinalAeon »

ok i got to where u were talking about but when i hit operations it said the following below the tabs:

-------------------------------------------------------------------------------

Can't open file: 'phpbb_users.MYI'. (errno: 145)

Error

SQL-query :

SHOW COLUMNS FROM `phpbb_users` FROM `fearmysk_forum`

MySQL said:


Can't open file: 'phpbb_users.MYI'. (errno: 145)

-------------------------------------------------------------------------------

Please keep helping me I really appreciate it!

Thank you,

FinalAeon :oops:
evilMind
Forum Contributor
Posts: 145
Joined: Fri Sep 19, 2003 10:09 am
Location: Earth

Post by evilMind »

ok lets try this.

when you first "log in" to mysql (or on the very first page you see when you click the phpMyAdmin link)

*click "Databases"

*Under the Database Column Select the name of the database that has the phpbb_users table in it.
*Note* You should then see a list of tables which are in that database

*At the top click on the tab that says "SQL"

*In the text box " Run SQL query/queries on database " enter this:
REPAIR TABLE `phpbb_users` EXTENDED


*At the bottom (under or Location of text file) Click Go.
php_wiz_kid
Forum Contributor
Posts: 181
Joined: Tue Jun 24, 2003 7:33 pm

Post by php_wiz_kid »

*Click on SQL

*Type REPAIR TABLE `phpbb_users` EXTENDED;

This might fix the problem through phpMyAdmin. I had the exact same problem not to long ago.

Another way you could do this, without having to use query's would be:

*Select database in left panel.

*Place a checkmark in the table that's not working.

*In the dropdown menu which says "With selected:" select "Repair Table".

Hopefuly my instructions will be correct depending on the version on phpMyAdmin you are using. I really hope this helps.
FinalAeon
Forum Newbie
Posts: 17
Joined: Sat Aug 02, 2003 2:51 pm
Location: ATL, GA

Post by FinalAeon »

Well no i still get the same error when i click SQL tab. And I don't know where u are talking about "database"

I'm going to just reinstall it it's no big deal. Thanks for all of ur help though!

Thank you,

FinalAeon :oops:
Cruzado_Mainfrm
Forum Contributor
Posts: 346
Joined: Sun Jun 15, 2003 11:22 pm
Location: Miami, FL

Post by Cruzado_Mainfrm »

that meanst he is not going to 'learn' anything, because he decided to go the novice 'easy' way
FinalAeon
Forum Newbie
Posts: 17
Joined: Sat Aug 02, 2003 2:51 pm
Location: ATL, GA

Post by FinalAeon »

well "sorry" there buddy, but i wasn't getting too many answers and i was going on 5 days without knowing what to do. And by the way, i've had about 4 people tell me that i "couldn't" fix it unless i reinstalled phpbb. since what the person put above didn't work. that's what everyone told me to do. so if u know how to fix it, i'd like you to post it here anywayz if you wouldn't mind just so i know u arent some sh** head <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> that thinks he's all cool...
FinalAeon
Forum Newbie
Posts: 17
Joined: Sat Aug 02, 2003 2:51 pm
Location: ATL, GA

Post by FinalAeon »

but of course if you do know then i have respect for you of course. just so u know that i'm not a <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> head. :lol:
Post Reply