Zen Cart Logo
Forums / General Questions / How Can I restore Just One Table In ZenCart?

How Can I restore Just One Table In ZenCart?

Views: 1,050

Results 1 to 14 of 14
5 Jan 2011, 5:28 PM
#1
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

How Can I restore Just One Table In ZenCart?

I am getting the error message

1146 Table 'jason90_zc1.zen_configuration' doesn't exist

I looked in phyMyAdmin and the table configuration is missing. There doesn't seem to be any other tables which are missing.
My installation as been working fine for years. Then one day I go to my Zencart and I get the above error. I don't know why
or how, but I am now missing a table.

Is there a way to restore just that table so that I don't need to completely redo ZenCart from scratch? I hope so. No I did
not do a backup of my system.

Jason

5 Jan 2011, 5:39 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How Can I restore Just One Table In ZenCart?

Check the hacked area as I would venture that you have been hacked

5 Jan 2011, 5:39 PM
#3
design75 avatar

design75

Totally Zenned

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

Re: How Can I restore Just One Table In ZenCart?

don't bother with restoring just that one table, cause you probably have been hacked.

5 Jan 2011, 5:46 PM
#4
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: How Can I restore Just One Table In ZenCart?

Well, I did suspect hacking. Yesterday, when I discovered it, I shortly thereafter called my hosting company, and told them. They opened a trouble ticket.

The Hacking section has two pertinent types of information. One is on how to patch security holes. The other is that you should do backups. Well, I did not do backups. And patching the security holes and changing my login and passwords are not going to fix the damage which has already been done.

What I was thinking of doing is installing another Zencart. Then going into phpMyadmin to look at the fields involved in the Configuration table. Then recreating the Configuration table for my old Zencart. Then finally when my old Zencart is working to transfer the template and products over to the new Zencart. I don't know what else to do.

Simply shaking your finger at me and pointing me to the Hacking section of the wiki is something which will naturally be done. But, I would like to know if there is any other advise which anybody would offer

I have a specific question, has the Configuration table changed from Zencart 1.3.8a to 1.3.9h?

Jason.

5 Jan 2011, 5:51 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How Can I restore Just One Table In ZenCart?

You have not stated what version of ZenCart you are using nor any server specs
re-
You can attempt to make a proper backup of what remains and do a fresh install with a new database then import your backup re-run zc_install to upgrade the database and test,,, I am not sure that this will be successful but it is worth a try

https://www.zen-cart.com/tutorials/index.php?article=103

5 Jan 2011, 6:12 PM
#6
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: How Can I restore Just One Table In ZenCart?

My Zencart is Zencart 1.3.8a

I am running on Apache

If I reinstall the old database, then what about a missing table in the old database?

5 Jan 2011, 6:33 PM
#7
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: How Can I restore Just One Table In ZenCart?

Here is another question. If I wanted to import any old tables from my old installation to my new installation, then which tables should I import to reduce the amount of work to a minimum? I would need to import product tables ofcourse. Then I would probably also download and reupload product images. What else do people recommend that I try to carry over from the old installation to the new? What tables should I move over?

Jason

5 Jan 2011, 11:55 PM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How Can I restore Just One Table In ZenCart?

Do a fresh install

Make a proper DB backup using the link I posted

Then Import that to your fresh install DB
It will only replace the tables that exist in it leaving any extras intact

The re-run zc_install to upgrade the DB

This is the easiest I can recommend and as I stated, it may work or may not

6 Jan 2011, 9:51 PM
#9
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: How Can I restore Just One Table In ZenCart?

I did as you said. As I have had some experience with phpMyadmin, the instructions were clear to me. It almost worked but inside of my new Zencart there were no products after I uploaded the old database file. The categories were carried over, but they had no products in them.

As a test, I decided to just use phpMyadmin to download the Configuration table from the new ZenCart. Then I uploaded that table to the old Zencart so that it would have a Configuration file. After that I tried to go into my old Zencart and I received this error.

1146 Table 'jason90_zc1.zen_products' doesn't exist

Which means that the hackers took out my Products table when they took out my Configuration table.

I am going to delete the new Zencart and then reinstall it. Then I am going to start over from scratch. What I have going for me now is experience in installing several Zencarts before. Also, my image files for my products were left intact.

Jason

6 Jan 2011, 10:11 PM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How Can I restore Just One Table In ZenCart?

1146 Table 'jason90_zc1.zen_products' doesn't exist
Check your old DB against your new DB for the DB prefix

If you manually installed and did not specify a prefix this would look like 'jason90_products'

Try matching them up if they are not the same old to nerw

7 Jan 2011, 1:57 AM
#11
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: How Can I restore Just One Table In ZenCart?

I have been redoing my Zencart from scratch. My last question, or what should be my last question, is this. Are these the only links which I should consider when securing my site?

https://www.zen-cart.com/tutorials/index.php?article=73
http://www.zen-cart.com/forum/showthread.php?t=142784
http://www.zen-cart.com/wiki/index.php/Important_Site_Security_Recommendations
https://www.zen-cart.com/tutorials/index.php?article=398

Jason

7 Jan 2011, 11:50 AM
#12
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: How Can I restore Just One Table In ZenCart?

The one thing they always seem to leave out on here and the most important is to password protect your admin folder at a server level.

I had sites that used to get hacked, then I did this, and never had an issue since. I can even see in my stat logs that people are attempting to hack my site every day searching for embedded PHP files, but as they are always via the admin folder, they can never get anywhere due to the password protection. No PHP attacks or intrusions will ever get through.

8 Jan 2011, 5:42 AM
#13
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: How Can I restore Just One Table In ZenCart?

Would this apply also to the latest Zencart, 1.3.9h? Does the latest Zencart do this for you or not?

Jason

9 Jan 2011, 2:51 AM
#14
jasondamisch avatar

jasondamisch

New Zenner

Join Date:
Dec 2005
Posts:
19
Plugin Contributions:
0

Re: How Can I restore Just One Table In ZenCart?

Maybe you don't need to answer that last question. I just went ahead and added the Apache file folder security. Now I need to login twice to get into my admin area.

Jason