Fixing SQL Error : 1016 Can't open file:

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
JKapoen
Registered User
Posts: 5
Joined: Thu Apr 06, 2006 5:59 pm

Post by JKapoen »

Thanks for the file. Really great job.

User avatar
felguard
Registered User
Posts: 68
Joined: Tue Oct 18, 2005 7:41 am
Contact:

Post by felguard »

Wow, it worked perfectly. It was as easy as 123. I wonder why this error happened though, my forums was working just a day ago.

BabyDreams
Registered User
Posts: 260
Joined: Wed Dec 07, 2005 9:28 pm

Post by BabyDreams »

OK silly question time!

I read the reply about taking out the 'secret code' bit but I'm not sure exactly which bit that is - can someone help me please?

:oops: :D

BabyDreams
Registered User
Posts: 260
Joined: Wed Dec 07, 2005 9:28 pm

Post by BabyDreams »

I run the program but now I got these errors.

What do I need to do to sort these out?? Its driving me nuts :lol:


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/mkportal/include/mk_mySQL.php on line 57

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/mkportal/include/mk_mySQL.php on line 57

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/mkportal/include/mk_mySQL.php on line 57
ERROR: Database error.
Cannot execute the query: SELECT * FROM mkp_blocks WHERE active='checked' order by progressive
MySql Error returned: Can't open file: 'mkp_blocks.MYD'. (errno: 144)
MySql Error code: 1016

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

BabyDreams wrote: I read the reply about taking out the 'secret code' bit but I'm not sure exactly which bit that is - can someone help me please?


The secrect code is a way to allow you to keep the script on your website for future use, without allowing unauthorized people to use it. If you plan on deleting the file after it does its work, you can remove these lines:

Code: Select all

// verify that we're supposed to run
// change 'XX42m3' to something unique for your site, so it will only
// execute if you call it as 'http://mysite.com/fixtables.php?XX42m3=1'
if (!isset($_GET['XX42m3']))
{
	header("Location: http://127.0.0.1/");
	die();
}
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

BabyDreams
Registered User
Posts: 260
Joined: Wed Dec 07, 2005 9:28 pm

Post by BabyDreams »

I managed to run it afterall but I got these errors now when I try to log into my site, and I have no idea what to do to fix them.

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/mkportal/include/mk_mySQL.php on line 57

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/mkportal/include/mk_mySQL.php on line 57

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/mkportal/include/mk_mySQL.php on line 57
ERROR: Database error.
Cannot execute the query: SELECT * FROM mkp_blocks WHERE active='checked' order by progressive
MySql Error returned: Can't open file: 'mkp_blocks.MYD'. (errno: 144)
MySql Error code: 1016

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

BabyDreams wrote: Cannot execute the query: SELECT * FROM mkp_blocks WHERE active='checked' order by progressive
MySql Error returned: Can't open file: 'mkp_blocks.MYD'. (errno: 144)
MySql Error code: 1016


This means the table in question wasn't repaired yet, which could happen if it has a different table prefix than the rest of your forum, or it took so long to repair other tables that it couldn't get to this one before PHP timed out. This is why you sometimes have to run the script multiple times...

Because the repair queries are sent one at a time, MySQL might not finish with all of them before PHP times out. MySQL will, however, complete the repair operation whether PHP is still waiting for it or not, and subsequent runs of the script will get an "OK" from MySQL, and move to the next table. So, multiple runs get further.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

BabyDreams
Registered User
Posts: 260
Joined: Wed Dec 07, 2005 9:28 pm

Post by BabyDreams »

I'll keep trying then thanks!

Is there a point where its not going to work and I need to do something else?

:D

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

Well, you should get a list of tables that were repaired/checked each time it runs, and the list will get longer each time, if it was a time-out issue. When it gets as far as "Now checking and repairing table phpbb_words: OK", you should be done... and any error that still remains should be brought up to your host for repair.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

BabyDreams
Registered User
Posts: 260
Joined: Wed Dec 07, 2005 9:28 pm

Post by BabyDreams »

OK thanks :D

Its fixed now!

:D :D :D

hadiey
Registered User
Posts: 9
Joined: Sun Jul 09, 2006 9:06 am

Post by hadiey »

I'm using the fixtables, and It was perfectly solve my forum problem, except my current time didn't display correctly.. It late 8 hours than my exact time here.. I have check the timezone at my profile and admin control panel, and Its right at GMT+8 hours.. Any Idea how to solve the time prob? Tq.

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

The time is based upon your web server's time, corrected for the user's profile time zone. If it is off, it is because the server time is wrong... and can not be fixed via SQL.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

Dragon1982
Registered User
Posts: 14
Joined: Mon May 22, 2006 8:08 pm

Post by Dragon1982 »

You're a lifesaver!!!
Worked like a charm

parentpa
Registered User
Posts: 8
Joined: Sat Sep 17, 2005 1:30 pm

Post by parentpa »

Code: Select all

Now checking and repairing table phpbb_privmsgs_text ... OK
Now checking and repairing table phpbb_ranks ... OK
Now checking and repairing table phpbb_search_results ... OK
Now checking and repairing table phpbb_search_wordlist ... OK
Now checking and repairing table phpbb_search_wordmatch ... OK
[b]Now checking and repairing table phpbb_sessions ... The handler for the table doesn't support repair[/b]
Now checking and repairing table phpbb_sessions_keys ... OK
Now checking and repairing table phpbb_smilies ... OK
Now checking and repairing table phpbb_themes ... OK
Now checking and repairing table phpbb_themes_name ... OK
I've started having trouble with a 'critical error'. (I'll have to get an image of it and post here next time). Hosting provider says it's not caused on their end, but a glitch in PHPBB.

Tried this fix (thank you!) but am getting the message above in bold. Anyway around this? I found in one of your earlier messages that I could replace 'REPAIR' with 'OPTIMIZE' but I got the same message.

Thanks in advance!

espicom
Registered User
Posts: 17905
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL

Post by espicom »

Your sessions table is probably of type "heap", and there is no repair for it... it's kept in memory, and doesn't have "real" indexes to repair. If all the other tables are OK, then the critical error is not likely to be for a broken table.

Rather than pictures, copy/paste the error text in. Pictures take lots of needless space... :wink:
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer

Locked

Return to “2.0.x Support Forum”