Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    database error Fatal error: 1146:Table plugin_control' doesn't exist

    Good evening.
    It's been a while.

    I'm doing a fresh install of 1.5.7 on WAMP and using the existing database from 1.5.5.d. I did a clean install to ensure it installed as expected (it did). I then dropped the DB and imported a copy of the 1.5.5 site DB. I ran the zc_install/index.php again expecting the option to 'upgrade' the DB. No luck unfortunately.
    I'm receiving 'WARNING: An Error occurred, please refresh the page and try again.' on the page and the following error log. Is there a SQL query to add the required PluginManager to the database perhaps?

    HTML Code:
    #1  trigger_error() called at [C:\wampsites\zencart\includes\classes\db\mysql\query_factory.php:170]
    #2  queryFactory->show_error() called at [C:\wampsites\zencart\includes\classes\db\mysql\query_factory.php:142]
    #3  queryFactory->set_error() called at [C:\wampsites\zencart\includes\classes\db\mysql\query_factory.php:226]
    #4  queryFactory->Execute() called at [C:\wampsites\zencart\includes\classes\PluginManager.php:29]
    #5  Zencart\PluginManager\PluginManager->getInstalledPlugins() called at [C:\wampsites\zencart\includes\application_top.php:189]
    #6  require(C:\wampsites\zencart\includes\application_top.php) called at [C:\wampsites\zencart\index.php:25]
    --> PHP Fatal error: 1146:Table 'zencart157.plugin_control' doesn't exist :: SELECT * FROM plugin_control WHERE status = 1 ==> (as called by) C:\wampsites\zencart\includes\classes\PluginManager.php on line 29 <== in C:\wampsites\zencart\includes\classes\db\mysql\query_factory.php on line 170.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error: 1146:Table plugin_control' doesn't exist

    Your DB_PREFIX is probably different in the old site and you didn't set the new one to match. Thus the tablenames aren't "found", therefore no upgrade option is offered.

    You can read more about DB_PREFIX and configure.php and install/upgrade in https://docs.zen-cart.com
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Fatal error: 1146:Table plugin_control' doesn't exist

    I did wonder that too, but neither old (1.5.5) nor new (1.5.7) setup is using prefixes (2x configure files nor DB).

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error: 1146:Table plugin_control' doesn't exist

    zc_install reads your /includes/configure.php file to get your database credentials.
    It connects to the database and looks for tables that Zen Cart normally uses.
    If it doesn't find them then it doesn't offer upgrade options.
    If it does find them then it inspects whether any specific upgrade steps are needed.

    So if it's not offering an upgrade then it's not finding the tables. Thus the credentials don't point to the database you expected.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,686
    Plugin Contributions
    9

    Default Re: Fatal error: 1146:Table plugin_control' doesn't exist

    Quote Originally Posted by picandnix View Post
    Good evening.
    It's been a while.

    I'm doing a fresh install of 1.5.7 on WAMP and using the existing database from 1.5.5.d. I did a clean install to ensure it installed as expected (it did). I then dropped the DB and imported a copy of the 1.5.5 site DB. I ran the zc_install/index.php again expecting the option to 'upgrade' the DB. No luck unfortunately.
    I'm receiving 'WARNING: An Error occurred, please refresh the page and try again.' on the page and the following error log. Is there a SQL query to add the required PluginManager to the database perhaps?

    HTML Code:
    #1  trigger_error() called at [C:\wampsites\zencart\includes\classes\db\mysql\query_factory.php:170]
    #2  queryFactory->show_error() called at [C:\wampsites\zencart\includes\classes\db\mysql\query_factory.php:142]
    #3  queryFactory->set_error() called at [C:\wampsites\zencart\includes\classes\db\mysql\query_factory.php:226]
    #4  queryFactory->Execute() called at [C:\wampsites\zencart\includes\classes\PluginManager.php:29]
    #5  Zencart\PluginManager\PluginManager->getInstalledPlugins() called at [C:\wampsites\zencart\includes\application_top.php:189]
    #6  require(C:\wampsites\zencart\includes\application_top.php) called at [C:\wampsites\zencart\index.php:25]
    --> PHP Fatal error: 1146:Table 'zencart157.plugin_control' doesn't exist :: SELECT * FROM plugin_control WHERE status = 1 ==> (as called by) C:\wampsites\zencart\includes\classes\PluginManager.php on line 29 <== in C:\wampsites\zencart\includes\classes\db\mysql\query_factory.php on line 170.
    Quote Originally Posted by DrByte View Post
    zc_install reads your /includes/configure.php file to get your database credentials.
    It connects to the database and looks for tables that Zen Cart normally uses.
    If it doesn't find them then it doesn't offer upgrade options.
    If it does find them then it inspects whether any specific upgrade steps are needed.

    So if it's not offering an upgrade then it's not finding the tables. Thus the credentials don't point to the database you expected.
    maybe, i'm wrong here, but i do not think the error is coming from the zc_install. the error is coming from this file:

    C:\wampsites\zencart\includes\application_top.php

    which i do not believe gets called when doing an upgrade or install.

    so, if one is trying to run a zc157 site on a zc156 database, that plugin table would not be there; and zc would generate the listed error.

    i'm not sure we are in fact in the zc_install directory.

    just a thought.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  6. #6
    Join Date
    Feb 2005
    Location
    Captain Cook, Hawaii
    Posts
    179
    Plugin Contributions
    0

    Default Re: Fatal error: 1146:Table plugin_control' doesn't exist

    I had the same problem.

    I was running 1.5.6c and upgraded directly to 1.5.7a (skipping 1.5.7).

    I received error messages about Query_factory and .htaccess

    I had no options display except INSTALL

    I checked the DB and was not using a prefix. I also found the table PLUGIN_CONTROL was missing.

    #1 trigger_error() called at [/home/www/MYSTORE.com/store/includes/classes/db/mysql/query_factory.php:170]
    #2 queryFactory->show_error() called at [/home/www/MYSTORE.com/store/includes/classes/db/mysql/query_factory.php:142]
    #3 queryFactory->set_error() called at [/home/www/MYSTORE.com/store/includes/classes/db/mysql/query_factory.php:226]
    #4 queryFactory->Execute() called at [/home/www/MYSTORE.com/store/includes/classes/PluginManager.php:29]
    #5 Zencart\PluginManager\PluginManager->getInstalledPlugins() called at [/home/www/MYSTORE.com/store/includes/application_top.php:189]
    #6 require(/home/www/MYSTORE.com/store/includes/application_top.php) called at [/home/www/MYSTORE.com/store/index.php:25]
    --> PHP Fatal error: 1146:Table 'MYLOGIN_store.plugin_control' doesn't exist :: SELECT * FROM plugin_control WHERE status = 1 ==> (as called by) /home/www/MYSTORE.com/store/includes/classes/PluginManager.php on line 29 <== in /home/www/MYSTORE.com/store/includes/classes/db/mysql/query_factory.php on line 170.

    I restored the site and verified it was working under 1.5.6c and will try an update to 1.5.7 and then to 1.5.7a as time permits.
    Aloha from Hawaii! (its a dirty job, but SOMEBODY has to live here...)

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error: 1146:Table plugin_control' doesn't exist

    Quote Originally Posted by mshultise View Post
    I had no options display except INSTALL
    That's the issue you'll need to sort out first.
    If you don't run the database-upgrade step with zc_install, then you'll keep getting the "Table 'plugin_control' doesn't exist" error.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Apr 2008
    Location
    Qld, Australia
    Posts
    257
    Plugin Contributions
    6

    Default Re: Fatal error: 1146:Table plugin_control' doesn't exist

    I may be off on a tangent here but in the original post picandnix stated that they "dropped the DB". This will lose all the 157a changes.

    My migration strategy sequence is:
    create a new database with MySQl or PHPMyadmin
    using zc_install create the empty database in 157a to get the new structure and the required access settings
    import the old data into the new 157a database [MySQl console is a lot faster than PHPMyAdmin]
    using zc_install upgrade the database

    Once the database has been created you can import the old data as often as you like BUT you must run the database upgrade after each import.

  9. #9
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Fatal error: 1146:Table plugin_control' doesn't exist

    Quote Originally Posted by OldNGrey View Post
    I may be off on a tangent here but in the original post picandnix stated that they "dropped the DB". This will lose all the 157a changes.

    My migration strategy sequence is:
    create a new database with MySQl or PHPMyadmin
    using zc_install create the empty database in 157a to get the new structure and the required access settings
    import the old data into the new 157a database [MySQl console is a lot faster than PHPMyAdmin]
    using zc_install upgrade the database

    Once the database has been created you can import the old data as often as you like BUT you must run the database upgrade after each import.
    This sequence (maybe not right now in version 1.5.7a) could result in the installer not offering an upgrade option as tables that are expected to be missing would be found.

    The upgrade sql script includes the table creation steps to be performed when going to ZC 1.5.7.
    As to that error, that was as stated above what I got when I had tried to access some portion of the store directly before performing the database upgrade in its entirety.

    Do you happen to know the history of plugins that have been installed or used against the database? Wondering if part of the issue is that a date/datetime field has an incorrect value/default value. There should also be zcinstall logs in the logs directory that may offer information about the situation.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Mar 2009
    Posts
    15
    Plugin Contributions
    0

    Default Re: Fatal error: 1146:Table plugin_control' doesn't exist

    I was just upgrading to 1.5.7b and got this same error.

    I follow all the instructions on https://docs.zen-cart.com/user/upgra...led_upgrading/ and everything was working great in the new_store copy.

    I then did the steps in the instructions to move it live.
    - renamed new_store to store
    - updated both configure.php files to point to the current live database.
    - I then tried to run the zc_install to update the live database to 1.5.7b.

    I got a 500 Internal Server Error trying to hit the zc_install area to update the database. When I looked in the logs folder I see the same error posted in the thread.

    Has anyone figure out the issue and how to resolve it? I could try coping the table missing from the new_store test database but that may break something else.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 PHP Fatal error: 1146:, table doesn't exist
    By cubmanky in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 4 Nov 2018, 02:10 PM
  2. v150 PHP Fatal error: 1146:Table 'products_attrib_cross_validation' doesn't exist
    By diamondminer in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 24 Feb 2013, 03:42 PM
  3. v151 upgrading error 1146 table doesn't exist
    By scottrdj in forum Upgrading to 1.5.x
    Replies: 4
    Last Post: 31 Dec 2012, 03:05 PM
  4. Replies: 3
    Last Post: 27 Jul 2011, 08:32 PM
  5. 1146 Table error zenconfiguration doesn't exist
    By gayelston in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 1 Dec 2007, 10:26 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR