Page 1 of 2 12 LastLast
Results 1 to 10 of 44

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Database Conversion Tools [Support Thread]

    This plugin's been around for a while (https://www.zen-cart.com/downloads.php?do=file&id=2367) and deserves its own support thread!

    I've just submitted v4 to the Plugins area. That version also checks the overall database collation and, if it's not currently utf8, makes that conversion, too!

    The previous versions of this plugin only focused on converting the table-based collations. If a database started with a collation of latin1_general_ci, for instance, the previous versions would properly convert all the database tables to use utf8_general_ci but leave the overall collation unchanged.

    The next time a new table is added to that database, that table and all character fields within it would default to the database's default: latin1_general_ci. Not a good thing!
    Last edited by swguy; 16 Aug 2023 at 03:26 PM. Reason: Updated URL of converter plugin

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Convert Database to UTF8 (convert_db2utf8) [Support Thread]

    v4 is now available for download from the Plugins.

  3. #3
    Join Date
    Feb 2012
    Posts
    27
    Plugin Contributions
    0

    Default Re: Convert Database to UTF8 (convert_db2utf8) [Support Thread]

    Hi

    I have latin1 and utf8 tables in my database, is this module ok to use on this?

    Regards

    Mike

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Convert Database to UTF8 (convert_db2utf8) [Support Thread]

    Quote Originally Posted by mike14017 View Post
    Hi

    I have latin1 and utf8 tables in my database, is this module ok to use on this?

    Regards

    Mike
    Yes, that's the problem that this module solves! The plugin's processing will convert the database, all tables and their fields to utf8 ... just remember to update your configure.php files (both admin and storefront) to identify that the database's DB_CHARSET is now utf8 instead of latin1.

    You should also change the CHARSET definition in your store's base language files (e.g. /includes/languages/english.php, /YOUR_ADMIN/includes/languages/english.php) to reflect a utf8-type character encoding.

  5. #5
    Join Date
    Feb 2012
    Posts
    27
    Plugin Contributions
    0

    Default Re: Convert Database to UTF8 (convert_db2utf8) [Support Thread]

    Hi

    Done all that and converted DB. Everything seems fine.

    What a cracking module, thank you.

    Mike

  6. #6
    Join Date
    Jan 2011
    Location
    Adelaide, Australia
    Posts
    1,670
    Plugin Contributions
    1

    Default Re: Convert Database to UTF8 (convert_db2utf8) [Support Thread]

    Thanks for a great tool Cindy - fast and seamless.

    cheers,
    Mike

  7. #7
    Join Date
    Aug 2008
    Location
    Sydney Australia
    Posts
    493
    Plugin Contributions
    0

    Default Re: Database Conversion Tools [Support Thread]

    Hi All,

    Just received this message after running the program on a live server:

    ALTER TABLE `product_type_layout` DROP INDEX `unq_config_id_zen`, DROP INDEX `idx_key_value_zen`, DROP INDEX `idx_type_id_sort_order_zen`
    1075: Incorrect table definition; there can be only one auto column and it must be defined as a key

    I am running version 1.5.5.e and I am not sure what I should be doing with this error so I have restored the backup database that I had.

    Any assistance would be a great help because the Collations (of live server before running the module) in the database consist of the following:

    latin1_swedish_ci
    utf8mb4_general_ci
    utf8_general_ci

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Database Conversion Tools [Support Thread]

    @Bruce1952, please access the site's cPanel's phpMyAdmin and post a screenshot of the "Structure View" of the site's product_type_layout table.

  9. #9
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Database Conversion Tools [Support Thread]

    Weird issue:

    [30-Jul-2023 18:30:02 UTC] PHP Fatal error: Uncaught mysqli_sql_exception: Incorrect table definition; there can be only one auto column and it must be defined as a key in /Users/scott/sites/client/ConvertDb.php:736
    Stack trace:
    #0 /Users/scott/sites/client/ConvertDb.php(736): mysqli_query(Object(mysqli), 'ALTER TABLE `ze...')
    #1 /Users/scott/sites/client/ConvertDb.php(375): ConvertDb->doQuery('ALTER TABLE `ze...')
    #2 /Users/scott/sites/client/convert_database.php(282): ConvertDb->updateTableCollations('zen_better_toge...', 'utf8mb4_unicode...')
    #3 {main}
    thrown in /Users/scott/sites/client/ConvertDb.php on line 736

    What's confusing is that there *is* only one auto column and it *is* defined as a key. So I'm not sure why this is failing.

    Also, this backtrace was not written to /logs, which might be a feature to add in the next version.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  10. #10
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Database Conversion Tools [Support Thread]

    Another database, different issue:

    [30-Jul-2023 22:06:38 UTC] PHP Fatal error: Uncaught mysqli_sql_exception: Specified key was too long; max key length is 1000 bytes in /Users/scott/sites/thatsoft_store/ConvertDb.php:736
    Stack trace:
    #0 /Users/scott/sites/thatsoft_store/ConvertDb.php(736): mysqli_query(Object(mysqli), 'CREATE INDEX `i...')
    #1 /Users/scott/sites/thatsoft_store/ConvertDb.php(395): ConvertDb->doQuery('CREATE INDEX `i...')
    #2 /Users/scott/sites/thatsoft_store/convert_database.php(282): ConvertDb->updateTableCollations('coupons', 'utf8mb4_unicode...')
    #3 {main}
    thrown in /Users/scott/sites/thatsoft_store/ConvertDb.php on line 736

    Keys on coupons table are as per basic install in 1.5.8.

    Running in PHP 8.1 + MySQL 5.7.39
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 Database I/O Manager (DbIo) Plugin [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 475
    Last Post: 23 Feb 2024, 05:44 PM
  2. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  3. v156 PWA, Offline support Push notifications addon [Support Thread]
    By perfumbg in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 May 2019, 02:27 PM
  4. v155 Database Server Info [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 20 Jan 2017, 01:17 PM
  5. Rate conversion in paypal non-support currency
    By limcheewooi in forum PayPal Express Checkout support
    Replies: 1
    Last Post: 7 Jul 2009, 03:13 AM

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