Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 44
  1. #11
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

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

    I've got a beta release of my update to the convert_db2utf8 and utf8mb4-conversion utilities available for (er) some beta testing: https://github.com/lat9/database-con...g/v2.0.0-beta1

    Please remember that this is a beta, so make sure to back up any database that you're using to kick the tires! This tool provides the following features:

    1. Detects and corrects zero-date defaults in database fields.
    2. Detects and corrects zero-date values in database fields.
    3. Reports on any mixed-collations present in the database and provides a means to correct them.
    4. Provides a means to update a latin1 database to either utf8 or utf8mb4 or a utf8 database to utf8mb4.

    I'd especially appreciate any testing on 'true' multi-byte (e.g. Japanese or Hebrew) databases, as I have no access to such an installation.

    Any reports of issues (and, hopefully successes), please report back here.

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

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

    Fantastic news, thank you Cindy.

    For those who may not be aware, moving to UTF-8 is a best practice for Zen Cart. It allows you to support emojis, various foreign languages (including foreign names), and many other things. You can read about it here:

    https://docs.zen-cart.com/user/upgra...nvert_to_utf8/
    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.

  3. #13
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

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

    Quote Originally Posted by swguy View Post
    Fantastic news, thank you Cindy.

    For those who may not be aware, moving to UTF-8 is a best practice for Zen Cart. It allows you to support emojis, various foreign languages (including foreign names), and many other things. You can read about it here:

    https://docs.zen-cart.com/user/upgra...nvert_to_utf8/
    I believe that it's the database's utf8mb4 character-set that fully enables those features.

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

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

    The updated Database Conversion Tool is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2367

    Additional information can be found on the tool's GitHub repository: https://github.com/lat9/database-converter

  5. #15
    Join Date
    Aug 2008
    Location
    Sydney Australia
    Posts
    496
    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

  6. #16
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    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.

  7. #17
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,699
    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.

  8. #18
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,699
    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.

  9. #19
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Database Conversion Tools [Support Thread]

    Quote Originally Posted by swguy View Post
    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.
    Shoot a copy of the original, zipped or gzipped database to my direct email and I'll give it a look-see.

  10. #20
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,495
    Plugin Contributions
    88

    Default Re: Database Conversion Tools [Support Thread]

    Quote Originally Posted by swguy View Post
    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
    What was the database's base charset/collation and that for the coupons table originally?

 

 
Page 2 of 5 FirstFirst 1234 ... 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