Zen Cart Logo
Forums / General Questions / Can you help? Error 1034 - HELP

Can you help? Error 1034 - HELP

Locked

Views: 4,920

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
2 Dec 2006, 10:06 AM
#1
twg avatar

twg

New Zenner

Join Date:
Apr 2006
Posts:
10
Plugin Contributions:
0

Can you help? Error 1034 - HELP

Dear guys,

I am getting this message on my website now. I can still access to the ADMIN page but the website is completely DOWN.

Error Message:

1034 Incorrect key file for table 'whos_online'; try to repair it

Please advise

Thanks in advance

Andrew

2 Dec 2006, 11:40 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Can you help? Error 1034 - HELP

I'm not an expert in this area, but this is a MySQL error that appears to be suggesting that your whos_online table structure is corrupt. As you still have access to the Admin, you might be able to get around it by turning off the whos online sidebox - but that's a complete guess, otherwise I suspect that you have some work to do to rebuild at least that table in the datbase (probably by dropping and recreating it) using a tool such as phpMyAdmin.

Make sure you have backups.

2 Dec 2006, 3:02 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can you help? Error 1034 - HELP

You could also go into phpMyAdmin and run this in the SQL for your database ...

This will drop the table and remake it fresh:

DROP TABLE IF EXISTS whos_online;
CREATE TABLE whos_online (
  customer_id int(11) default NULL,
  full_name varchar(64) NOT NULL default '',
  session_id varchar(128) NOT NULL default '',
  ip_address varchar(15) NOT NULL default '',
  time_entry varchar(14) NOT NULL default '',
  time_last_click varchar(14) NOT NULL default '',
  last_page_url varchar(255) NOT NULL default '',
  host_address text NOT NULL,
  user_agent varchar(255) NOT NULL default '',
  KEY idx_ip_address_zen (ip_address),
  KEY idx_session_id_zen (session_id),
  KEY idx_customer_id_zen (customer_id),
  KEY idx_time_entry_zen (time_entry),
  KEY idx_time_last_click_zen (time_last_click),
  KEY idx_last_page_url_zen (last_page_url)
) TYPE=MyISAM;

NOTE: you will need to adjust that if you are using prefixes on your database table names ...

11 Dec 2006, 2:20 PM
#4
cunomor avatar

cunomor

New Zenner

Join Date:
Apr 2006
Posts:
11
Plugin Contributions:
0

Re: Can you help? Error 1034 - HELP

Hi,

I was getting this same error. I used the drop and recreate fix. It's seems to have worked.

Now I am getting another error, apparently in the banners tables.

1034 Incorrect key file for table 'b'; try to repair it
in:
[select b.banners_id, b.expires_date, b.expires_impressions, sum(bh.banners_shown) as banners_shown from zen_banners b, zen_banners_history bh where b.status = 1 and b.banners_id = bh.banners_id group by b.banners_id, b.expires_date, b.expires_impressions]

What do I do?

Thanks,

Derek

11 Dec 2006, 2:22 PM
#5
cunomor avatar

cunomor

New Zenner

Join Date:
Apr 2006
Posts:
11
Plugin Contributions:
0

Re: Can you help? Error 1034 - HELP

Let me clarify; I already performed REPAIR TABLE zen_banners_history;

cunomor:

Hi,

I was getting this same error. I used the drop and recreate fix. It's seems to have worked.

Now I am getting another error, apparently in the banners tables.

1034 Incorrect key file for table 'b'; try to repair it
in:
[select b.banners_id, b.expires_date, b.expires_impressions, sum(bh.banners_shown) as banners_shown from zen_banners b, zen_banners_history bh where b.status = 1 and b.banners_id = bh.banners_id group by b.banners_id, b.expires_date, b.expires_impressions]

What do I do?

Thanks,

Derek

11 Dec 2006, 5:28 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Can you help? Error 1034 - HELP

cunomor:

Now I am getting another error, apparently in the banners tables.

1034 Incorrect key file for table 'b'; try to repair it
in:
[select b.banners_id, b.expires_date, b.expires_impressions, sum(bh.banners_shown) as banners_shown from zen_banners b, zen_banners_history bh where b.status = 1 and b.banners_id = bh.banners_id group by b.banners_id, b.expires_date, b.expires_impressions]

I already performed REPAIR TABLE zen_banners_history;

"b" refers to the "banners" table.

12 Dec 2006, 7:40 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can you help? Error 1034 - HELP

It doesn't look like the error is reflecting the table name ...

Did you install an add-on or customize some code?

14 Dec 2006, 2:19 PM
#8
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: Can you help? Error 1034 - HELP

I have the same problem, but mine is for the sessions table:

1034 Incorrect key file for table 'sessions'; try to repair it

I can't get into EITHER the site OR the admin.

Could someone please provide the proper sql code to reconstruct this table via phpMyAdmin as suggested above??

Thank you very much, Tom

14 Dec 2006, 2:27 PM
#9
tlyczko avatar

tlyczko

Zen Follower

Join Date:
Dec 2003
Location:
UPstate NY
Posts:
398
Plugin Contributions:
1

Re: Can you help? Error 1034 - HELP

New update: I found 'Repair Table' in phpMyAdmin and ran this, it fixed the table.
Whew!!
Could this thread be moved or something to the FAQ or wiki section so other people know how to fix their tables like this??
It takes a few moments to find Repair in phpMyAdmin:

Open the database, use the login/pass that you use for ZC
Find the table(s) to fix
Click Operations
Scroll down, find repair table
Click repair table, hopefully this is all you need to do

Thank you, :) tom

20 Dec 2007, 10:33 PM
#10
ericny avatar

ericny

Zen Follower

Join Date:
Jan 2007
Posts:
100
Plugin Contributions:
0

Re: Can you help? Error 1034 - HELP

I was a little hesitant to run SQL above since it was from 2003 but it worked like a charm. Thank you.

28 Jan 2009, 4:57 PM
#11
andy_gs avatar

andy_gs

Zen Follower

Join Date:
Jun 2008
Posts:
187
Plugin Contributions:
0

Re: Can you help? Error 1034 - HELP

tlyczko has the correct solution for the problem, many thanks for this :)

can i just ask people did there error start appearing when they tried to do a dump of their database? or was it just a random error that occured?