Zen Cart Logo
Forums / General Questions / Rebuilding store w/existing DB

Rebuilding store w/existing DB

Locked

Views: 3,024

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
28 Sep 2009, 12:09 AM
#1
brian1234 avatar

brian1234

Zen Follower

Join Date:
Jun 2004
Posts:
102
Plugin Contributions:
0

Rebuilding store w/existing DB

Hi, I'm having trouble rebuilding a Zen-Cart store. The previous and current store both are the current version.

I backed up my original DB, created a new DB and installed ZC into the new DB fine. Everything is working good.

I thought I would be able to drop the tables there and import the tables from my old DB but when I try to view the site I get an error:
1146 Table 'MyNewDatabaseName.configuration' doesn't exist
in:
[select configuration_key as cfgkey, configuration_value as cfgvalue from configuration]

So, it appears that somewhere in the database it has stored the name of the old one? Or am I having some other issue? I can clear the DB out and import the blank-store.sql that I created after the new ZC install process and everything works again, so I know my DB settings in the configure.php's is fine.

Oh, I also have a directory on the server I haven't seen before: '-newname' ... what is that about?

Hints or tips appreciated, thanks!

28 Sep 2009, 2:05 AM
#2
muzz avatar

muzz

Totally Zenned

Join Date:
Mar 2009
Location:
Australia
Posts:
604
Plugin Contributions:
0

Re: Rebuilding store w/existing DB

HI There,

After you have installed the DB etc.. you replaced the new zen cart files with your previous ones?

Check your DB paths, names and passwords:

includes/configure.php

admin/includes/configure.php

28 Sep 2009, 2:34 AM
#3
brian1234 avatar

brian1234

Zen Follower

Join Date:
Jun 2004
Posts:
102
Plugin Contributions:
0

Re: Rebuilding store w/existing DB

It's a clean / new ZC install, the only files I uploaded besides the stock ZC ones are my custom template.

Since it is operational with the post-install data in the DB I believe the names, PWs and paths are all correct.

Now I'm not completely sure the old store was the current version. It was the version current as of Jan 20 2008 when I set it up.

28 Sep 2009, 2:43 AM
#4
muzz avatar

muzz

Totally Zenned

Join Date:
Mar 2009
Location:
Australia
Posts:
604
Plugin Contributions:
0

Re: Rebuilding store w/existing DB

I suggest that you login to your MYPHP admin.

Ensure the database name is correct.

Then compare your OLD website files:

includes/configure.php

admin/includes/configure.php

to the NEW one.

Are they EXACTLY the same ?

You comparing this area:

define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'YOURdatabaseUSERNAME');
define('DB_SERVER_PASSWORD', 'yourPASSWORD');
define('DB_DATABASE', 'YOURshopNAME');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');
// for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage

28 Sep 2009, 2:58 AM
#5
brian1234 avatar

brian1234

Zen Follower

Join Date:
Jun 2004
Posts:
102
Plugin Contributions:
0

Re: Rebuilding store w/existing DB

Brian1234:

[The site] is operational with the post-install data in the DB

ZC is not having a problem connecting to the DB. It appears to be having trouble finding a table or table data once connected.

Oh, and since the current release of ZC was in 2007, I'm 99 & 44/100ths sure the store I setup in 2008 was using it. Since it's been so long though, I'm starting to wonder if ZC development has stopped.

28 Sep 2009, 3:16 AM
#6
brian1234 avatar

brian1234

Zen Follower

Join Date:
Jun 2004
Posts:
102
Plugin Contributions:
0

Re: Rebuilding store w/existing DB

AHA! Got it!

The old DB had a table prefix I hadn't noticed. Once I edited the config files for that, all is well.

Thanks for the replies Muzz.

28 Sep 2009, 4:38 AM
#7
muzz avatar

muzz

Totally Zenned

Join Date:
Mar 2009
Location:
Australia
Posts:
604
Plugin Contributions:
0

Re: Rebuilding store w/existing DB

Np. Glad it's all working.

28 Sep 2009, 4:57 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Rebuilding store w/existing DB

Brian1234:

Since it's been so long though, I'm starting to wonder if ZC development has stopped.
Not at all. Check the Announcements area regarding v2.0