Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Swapped host, now "zen_db_cache' doesn't exist" error

Swapped host, now "zen_db_cache' doesn't exist" error

Locked

Views: 3,027

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
22 Nov 2008, 11:50 AM
#1
travellers avatar

travellers

Zen Follower

Join Date:
Oct 2008
Posts:
143
Plugin Contributions:
0

Swapped host, now "zen_db_cache' doesn't exist" error

I'm having a 'mare getting my zencart to work having moved my domain to a different host, culminating in the following error:

1146 Table 'shedtrad_zc1.zen_db_cache' doesn't exist
in:
[db_cache table]

So I did a bit of searching on here and came across a couple of threads which pointed me at the configure files in 'includes/' and 'admin/includes'. The error says that "**zen_**db_cache" doesn't exist and its right, it doesn't. But "db_cache **does **exist (i.e. no prefix). Hmmm. The thread indicated then that I'd need to remove the "zen_" from define('DB_PREFIX', but here's the rub - there **is **no prefix set there in either file!

I did make a further mistake in not noting down whether my database was called 'store' or 'shop' on my old installation, and because the domain has moved I haven't got that for reference anymore, but I dealt with that by creating blank databases with both names and importing my database files into each of them, so I should be covered regardless! So I now have three identical databases, called zc1 (the auto-installed one when I used Fantastico to create me a new zencart), shop, and store.

Any advice on what to try next? Pretty please? :smile:

22 Nov 2008, 11:55 AM
#2
travellers avatar

travellers

Zen Follower

Join Date:
Oct 2008
Posts:
143
Plugin Contributions:
0

Re: Swapped host, now "zen_db_cache' doesn't exist" error

Just a quick expand on the above;
Since the define('DB_PREFIX', ''); is already blank, but the error at the site URL still indicates "zen_db_cache' doesn't exist", I thought I'd check whether anything did change there if I modified the PREFIX line. So I inserted "wibble_" in both files and saved them, then rechecked the URL. I thought that should change the error from ```
1146 Table 'DOMAIN_zc1.zen_db_cache' doesn't exist
in:
[db_cache table]

1146 Table 'DOMAIN_zc1.wibble-zen_db_cache' doesn't exist
in:
[db_cache table]

22 Nov 2008, 12:24 PM
#3
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Swapped host, now "zen_db_cache' doesn't exist" error

Have you run FIX CACHE KEY file?

See Free Add Ons for fix_cache_key.php

22 Nov 2008, 12:39 PM
#4
travellers avatar

travellers

Zen Follower

Join Date:
Oct 2008
Posts:
143
Plugin Contributions:
0

Re: Swapped host, now "zen_db_cache' doesn't exist" error

fairestcape:

Have you run FIX CACHE KEY file?

See Free Add Ons for fix_cache_key.php

Generates the exact same error as above :blush:

22 Nov 2008, 12:58 PM
#5
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Swapped host, now "zen_db_cache' doesn't exist" error

you have 2 choices
1 edit the config files and lose the zen_ in the db prefix

or run the installer and choose update and add the db prefix....

it is obvious that you grabbed the wrong database when you moved,

Im hoping that it wasnt a live store.

22 Nov 2008, 1:07 PM
#6
travellers avatar

travellers

Zen Follower

Join Date:
Oct 2008
Posts:
143
Plugin Contributions:
0

Re: Swapped host, now "zen_db_cache' doesn't exist" error

Merlinpa1969:

you have 2 choices
1 edit the config files and lose the zen_ in the db prefix

Cant - as I said above, the prefix is already blank ```
define('DB_PREFIX', '');



> **Merlinpa1969:**
>
> or run the installer and choose update and add the db prefix....

Cant do that either - I reuploaded the zc_install and ran that, and was told ```
Previous Zen Cart™ Installation Found
However, the version level of your database cannot be determined, usually resulting from wrong table prefixes, or other database settings mismatches.

CAUTION: Only use the Upgrade option if you are sure your configure.php settings are correct.

so am not given an option to upgrade, only overwrite!

Merlinpa1969:

it is obvious that you grabbed the wrong database when you moved,

Im hoping that it wasnt a live store.

No, it wasn't live, it was about to go live when I decided to move to a better host first. There was only one db though, so I cant really have grabbed the wrong one!

22 Nov 2008, 1:25 PM
#7
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Swapped host, now "zen_db_cache' doesn't exist" error

Can you open up your database - the SQL code - perhaps in phpMyAdmin?

Are the tables prefixed there?

Also, have you followed Merlinpa's suggestion to lose the zen_ prefixes in configure.php

22 Nov 2008, 1:37 PM
#8
travellers avatar

travellers

Zen Follower

Join Date:
Oct 2008
Posts:
143
Plugin Contributions:
0

Re: Swapped host, now "zen_db_cache' doesn't exist" error

fairestcape:

Can you open up your database - the SQL code - perhaps in phpMyAdmin?

Are the tables prefixed there?

Also, have you followed Merlinpa's suggestion to lose the zen_ prefixes in configure.php

Yep, I can see the tables in phpMyAdmin, and the tables there dont have any prefix (they're called admin, customers, etc.). But now I think I must be understanding the replies wrong, because all the responses I've had say "drop the zen_ prefixes" even though I've said several times that the define('DB_PREFIX', ''); is blank. If this isn't what you mean, can you explain what you DO mean?

22 Nov 2008, 2:07 PM
#9
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Swapped host, now "zen_db_cache' doesn't exist" error

well
If your trying to access zen_ table name then tbe prefix is defined somewhere,

have you checked both the config and the admin/includes/configure.php

22 Nov 2008, 2:23 PM
#10
travellers avatar

travellers

Zen Follower

Join Date:
Oct 2008
Posts:
143
Plugin Contributions:
0

Re: Swapped host, now "zen_db_cache' doesn't exist" error

Okay, ready for the solution? Well, s'obvious, innit? I'm an idiot. If only we'd known that at the start, we could have dispensed with all the questions and cut straight to the chase!

The admin/includes/configure file, and the includes/configure file, that I was editing, were in fact on the .COM version of my domain. The URL I was looking at the errors on was the .CO.UK version of my domain. Thats why I couldn't see a prefix for the database while editing, but the page error displayed a prefix. (Whats supposed to happen is my .COM does nothing apart from redirect traffic to .CO.UK, but in my haste to fix the site I'd accidentally uploaded the files to both places, and then edited the wrong one!

So, I'm off now to tell the kids what a berk they've got for a dad! Meanwhile for anyone else experiencing difficulties with problems like this, check first that you're not working on the wrong files so you dont feel as stooopid as I do now - remember we can ALL make silly mistakes!!!

22 Nov 2008, 3:14 PM
#11
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Swapped host, now "zen_db_cache' doesn't exist" error

Glad to hear your problem was sorted and thanks for sharing what worked.

22 Nov 2008, 3:45 PM
#12
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Swapped host, now "zen_db_cache' doesn't exist" error

Hey Travellers...

You're not alone on this one! I made EXACTLY the same error about a month ago (and spent several days trying to sort out what I had done wrong!)

10 points for making the admission publicly! :clap:

Glad you got it sorted...