Zen Cart Logo
Forums / General Questions / Table 'db_cache' is marked as crashed and should be repaired

Table 'db_cache' is marked as crashed and should be repaired

Views: 1,263

Results 1 to 6 of 6
21 Sep 2015, 8:30 AM
#1
lara2911 avatar

lara2911

New Zenner

Join Date:
Jun 2010
Location:
Hervey Bay, QLD Australia
Posts:
33
Plugin Contributions:
0

Table 'db_cache' is marked as crashed and should be repaired

Hi guys,
my cart doesn't work since this morning :( I did no changed, uploads or anything like that the night before. In the "public_html/cart/logs" I found this:

PHP Fatal error: 145:Table './wc449837_zc2/zen_db_cache' is marked as crashed and should be repaired :: delete from zen_db_cache in /home/wc449837/public_html/cart/includes/classes/db/mysql/query_factory.php on line 120

Could you help and let me know what to do to restore the shop again please?? I got the 1.5.3 version. Please talk to me like to a newbie as I am one :) I installed the shop and I am working with it for few years now but that's is pretty much it.
Your help would be very very much appreciated.
Cheers

21 Sep 2015, 8:57 AM
#2
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Table 'db_cache' is marked as crashed and should be repaired

Do you have acces to phpmyadmin?

21 Sep 2015, 2:00 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Table 'db_cache' is marked as crashed and should be repaired

Here is a possible solution.

Create a file (called cache_correct.php) having the following path: admin/includes/extra_datafiles/cache_crrect.php
Where admin is the folder of your secret admin folder.

<?php
if (!isset($_SESSION['cachedbcleared'] && $_SESSION['cachedbcleared'] != true) { 
$db->Execute('DROP TABLE IF EXISTS zen_db_cache;');
$db->Execute('CREATE TABLE zen_db_cache (
  cache_entry_name varchar(64) NOT NULL default \'\',
  cache_data mediumblob,
  cache_entry_created int(15) default NULL,
  PRIMARY KEY  (cache_entry_name)
) ENGINE=MyISAM;');

$_SESSION['cachedbcleared'] = true;
}

Attempt to access your admin login screen.

Check your logs folder for the same/new error messages.
If successful, delete the above file. If it caused an error directly related to that file or did not resolve the previous error, please advise. If there are new/different errors that can not be self resolved, either continue here or begin a new thread. :)

21 Sep 2015, 9:23 PM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Table 'db_cache' is marked as crashed and should be repaired

Lara2911:

Could you help and let me know what to do to restore the shop again please?? I got the 1.5.3 version.

Log into your cPanel.
Click on the icon for MySQL Database
Select your zencart database in the modify->repair dropdown
Click the 'repair the database' button.

Cheers
RodG

22 Sep 2015, 2:16 AM
#5
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Table 'db_cache' is marked as crashed and should be repaired

I have changed to InnoDB And it fixed it, not the ideal solution.

Are you using shared hosting, that's the most common issue I have seen for this

Have you tried file based caching?

22 Sep 2015, 11:07 PM
#6
lara2911 avatar

lara2911

New Zenner

Join Date:
Jun 2010
Location:
Hervey Bay, QLD Australia
Posts:
33
Plugin Contributions:
0

Re: Table 'db_cache' is marked as crashed and should be repaired

RodG:

Log into your cPanel.
Click on the icon for MySQL Database
Select your zencart database in the modify->repair dropdown
Click the 'repair the database' button.

Cheers
RodG

Yes, have done it :) It helped!! Its all good and running again :D Thank you very much for all your help people!!!! xx