Forums / Installing on a Linux/Unix Server / Database error after moving hosts

Database error after moving hosts

Locked
Results 1 to 20 of 22
This thread is locked. New replies are disabled.
20 May 2008, 09:55
#1
djpete avatar

djpete

New Zenner

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

Database error after moving hosts

You guys have prob had this one a million times before.
I have moved hosts and as per instructions on the FAQ section but I get the following...

1146 Table 'namechanged_zc1.configuration' doesn't exist
in:
[select configuration_key as cfgkey, configuration_value as cfgvalue from configuration]

I have checked the 2 config files and the database names match up.
I also used the fix key script which worked on another migration a few months back but no go for this one...
20 May 2008, 10:10
#2
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

i should say i went from version Zen Cart 1.3.0.1
to 1.3.8.
Maybe that is my problem??
20 May 2008, 13:17
#3
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

well i just redid the whole thing again with same version and exactly the same probelm.
any help appreciated.
20 May 2008, 17:32
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Database error after moving hosts

If it's saying that the "configuration" table doesn't exist, then it's connecting to a database somewhere, but not the one that contains Zen Cart tables.

So, make sure that you've properly set the database server/host name, database name, username/password properly for the new server.

If you've followed the FAQ on moving to a new server ( https://www.zen-cart.com/tutorials/index.php?article=100 ) then before you imported your data, the store should have been working. If not, then you've got an "installation" problem, not a "move" problem.

Additionally, if you're importing data from another server, it's important, as mentioned in the FAQ, to use the SAME setting for DB_PREFIX on the new server as you had on the old server. Otherwise you're telling it to point to a set of tables in your database that may be incorrect or don't exist at all.
20 May 2008, 22:07
#5
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

Can you explain what the prefix is pls.
Everything else checks ok.
It works fine with the orig database.
The prob is there when I upload the old database.
And when I reload the new one back up again it all works fine again...
20 May 2008, 22:39
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Database error after moving hosts

DB_PREFIX is defined in your configure.php files.

If it's defined as blank, then Zen Cart assumes there is no prefix added to table names.
If it's defined as some value, then Zen Cart adds that prefix to the start of all table names when it generates a query to extract data from the database.

So, in the case of the "configuration" table, if the prefix is left blank, then Zen Cart looks for a table named "configuration". If the prefix is defined as "storedata_" then Zen Cart looks for a table named "storedata_configuration".

That's why the FAQ about moving hosts tells you to make sure you use the same DB_PREFIX setting in your new site as you did in your old site. That way when you import your data from the old server to the new one, your new store will be able to find the tables used for Zen Cart.
20 May 2008, 22:57
#7
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

Thanks Dr.
I am pretty sure they are blank at the moment.
Can I just adjust this in the 2 config files or better to reinstall the right way?
20 May 2008, 23:29
#8
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

I will start again I think.
So my old database file was named for example...
blabla_zc1

When I install new setup I insert blabla_ for the prefix section?
Correct?
20 May 2008, 23:42
#9
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: Database error after moving hosts

Don't confuse the database NAME with the table PREFIX.

(The "prefix" in the NAME is often your host login name).

Try opening your database in phpMyAdmin and looking to see if the tables have a prefix. If they do, then that is the prefix you insert into the configure.php files as pointed out by DrByte above...
21 May 2008, 02:03
#10
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

Attached is my database file.
Can you please tell me the prefix I should be using because I am still having trouble.
21 May 2008, 03:18
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Database error after moving hosts

Since all your tablenames start with "zen_", that would be the prefix.
21 May 2008, 03:44
#12
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

take 4.
i will do the whole process again with the zen_ prefix at setup.
I WILL get it and post when i do.
Appreciate the help.

Last time I did this it was easy...lol
22 May 2008, 05:46
#13
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

zen_ prefix was the problem.
I feel like an idiot.
Don't comment on that last statement please :-)
Many thanks for all your time and effort!!!!!!!
29 May 2008, 08:35
#15
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

Good one Dr Byte (to be double sure! lol)
29 May 2008, 12:33
#16
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

unfortunately after 2 installs I still have a problem.
The cart will not show, but only on my computer.
Other pc's in the house are fine.
It trys to load and then after few secs
"Internet Explorer cannot display the webpage"
Occasionally it Will load.
I have tried cache and everything in IE7 with no joy...

I am going to try to make sure all of my files were overidden when I uploaded the old site over the new install.
I am reuploading it all again now...
29 May 2008, 13:18
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Database error after moving hosts

Djpete:


The cart will not show, but only on my computer.
Other pc's in the house are fine.

Perhaps the problem is with your computer then? If so, re-uploading won't solve the problem.
29 May 2008, 13:52
#18
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

i will also try version 1.30 as i did the one with the patch.
its not my pc because it only happens after I install the old files over the top.
The clean install works fine.
29 May 2008, 21:57
#19
djpete avatar

djpete

New Zenner

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

Re: Database error after moving hosts

I think the prob may be that before the cart was on a normal domain.
Now I have moved it to an addon domain...
So in fact it is not in the root directory anymore it is really in a subdirectory
30 May 2008, 01:48
#20
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Database error after moving hosts

Djpete:

I think the prob may be that before the cart was on a normal domain.
Now I have moved it to an addon domain...
So in fact it is not in the root directory anymore it is really in a subdirectory


Then your session cookies will be linked to the old domain.
You said you cleared your cache. What about your browser cookies?