Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2005
    Posts
    287
    Plugin Contributions
    0

    red flag Zencart 1.5.4 on MySQL 5.7.24

    We have migrated to a new host.

    However get below error on the product pages, which probably points out to MySql version error.

    How can we make our 1.5.4 work with the latest MySql 5.7.24 (till we upgrade our websites)

    Thanks

    =================
    [13-Nov-2018 01:52:20] PHP Fatal error: 1055:Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'xxx_xxx.o.date_purchased' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by :: select p.products_id, p.products_image

    from zen_orders_products opa, zen_orders_products opb, zen_orders o, zen_products p

    where opa.products_id = '6715'

    and opa.orders_id = opb.orders_id

    and opb.products_id != '6715'

    and opb.products_id = p.products_id

    and opb.orders_id = o.orders_id

    and p.products_status = 1

    group by p.products_id

    order by o.date_purchased desc

    limit 6 ==> (as called by) /home//public_html/includes/modules/mytemplate/also_purchased_products.php on line 16 <== in /home/public_html/includes/classes/db/mysql/query_factory.php on line 155

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

    Default Re: Zencart 1.5.4 on 5.7.24

    Quote Originally Posted by harry2cool View Post
    How can we make our 1.5.4 work with the latest MySql 5.7.24 (till we upgrade our websites)
    There were lots of query changes made back in 2016 when preparing v1.5.5 to make it compatible with MySQL 5.7

    You will need to upgrade your Zen Cart version, or downgrade your MySQL version.

    Ref: https://www.zen-cart.com/content.php...o-run-zen-cart


    Or you can compare all the v155 files against v154 and make the corresponding changes. But that's the same as upgrading.
    .

    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
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Zencart 1.5.4 on 5.7.24

    Quote Originally Posted by harry2cool View Post
    How can we make our 1.5.4 work with the latest MySql 5.7.24 (till we upgrade our websites)
    I forgot about another option: You could configure your MySQL to use a different "mode", so that it relaxes some of the stricter rules imposed out-of-the-box by MySQL 5.7.

    To do that I *think* you can safely replace your /includes/classes/db/mysql/query_factory.php with the one from v1.5.6 -- the raw source for that file is at: https://github.com/zencart/zencart/r...ry_factory.php

    And then you'll be able to override the MySQL mode by defining DB_MYSQL_MODE in both your Admin and your Catalog.
    Example code: https://github.com/zencart/zencart/b...ocalConfig.php (which lists all the available modes in a comment)

    To set that "define", you'll need to create a new file (I'd call it "mysql_56_mode.php") in /includes/extra_configures AND /admin/includes/extra_configures containing just the define statement you've decided works best to make your MySQL 5.7 work with MySQL 5.6 or 5.5 lesser-strict rules.

    Doing that could buy you a little more time to plan your upgrade. But you really should be upgrading to keep compatible with hosting software changes to PHP, MySQL, etc.
    .

    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.

  4. #4
    Join Date
    Oct 2005
    Posts
    287
    Plugin Contributions
    0

    Default Re: Zencart 1.5.4 on 5.7.24

    Yes we have already started working on the upgrades to use the latest Php and MySql.

    I really wanted to move to the new faster server ASAP and got the host to switch off MySql strict mode, after this all was smooth.

    Will enable the same after all the upgrades are done.

    Thanks for the great support.

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,488
    Plugin Contributions
    88

    Default Re: Zencart 1.5.4 on 5.7.24

    The suggestion that DrByte identified in post#3 of this thread works for most conditions, but does not address the case where the length of a character field (e.g. a varchar(64) one) is insufficient to hold the data being inserted or updated.

 

 

Similar Threads

  1. zencart 1.3.5 and new mysql
    By 100asa in forum General Questions
    Replies: 1
    Last Post: 20 Sep 2007, 12:14 PM
  2. Zencart and MySQL 5
    By colin99 in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 6 Jul 2006, 10:57 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