Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Oct 2008
    Posts
    141
    Plugin Contributions
    0

    Default 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:
    Code:
    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?

  2. #2
    Join Date
    Oct 2008
    Posts
    141
    Plugin Contributions
    0

    Default 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
    Code:
    1146 Table 'DOMAIN_zc1.zen_db_cache' doesn't exist
    in:
    [db_cache table]
    to
    Code:
    1146 Table 'DOMAIN_zc1.wibble-zen_db_cache' doesn't exist
    in:
    [db_cache table]
    but it didn't, the error is still the same either way. How come?!

  3. #3
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default 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

  4. #4
    Join Date
    Oct 2008
    Posts
    141
    Plugin Contributions
    0

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

    Quote Originally Posted by fairestcape View Post
    Have you run FIX CACHE KEY file?

    See Free Add Ons for fix_cache_key.php
    Generates the exact same error as above

  5. #5
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default 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.
    Zen cart PCI compliant Hosting

  6. #6
    Join Date
    Oct 2008
    Posts
    141
    Plugin Contributions
    0

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

    Quote Originally Posted by Merlinpa1969 View Post
    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
    Code:
      define('DB_PREFIX', '');

    Quote Originally Posted by Merlinpa1969 View Post
    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
    Code:
    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!


    Quote Originally Posted by Merlinpa1969 View Post
    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!

  7. #7
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default 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

  8. #8
    Join Date
    Oct 2008
    Posts
    141
    Plugin Contributions
    0

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

    Quote Originally Posted by fairestcape View Post
    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?

  9. #9
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default 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
    Zen cart PCI compliant Hosting

  10. #10
    Join Date
    Oct 2008
    Posts
    141
    Plugin Contributions
    0

    Default 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!!!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. EZ Pages disappeared and get "Table 'ezpages_content' doesn't exist" error
    By ilmarchez in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 19 Nov 2011, 05:34 AM
  2. Replies: 6
    Last Post: 7 Apr 2009, 12:30 AM
  3. table error please help: "table 'sessions' doesn't exist"
    By ebydrc in forum General Questions
    Replies: 3
    Last Post: 6 Apr 2008, 06:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg