Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jul 2011
    Posts
    146
    Plugin Contributions
    4

    Default ZC 1.57d PHP 8.0 compatibility to what extent?

    Just spent time upgrade one of my shopping cart from ZC 1.55f php 7.3 to ZC 1.57d with PHP 8.1
    I have notice the following pattern:
    ZC 1.57d seems to run flawlessly on Php 7.4. Its basic cart, so it doesnt really throw log entries at all, not even warnings or deprivation notices.

    However up on upgrading to PHP 8.0 (and even 8.1) , ZC 1.57d throws a whole lot of warnings. The warnings looks like they are from ZC core files.
    Is this a known issue with when running ZC 1.57d with PHP 8.0? Is there a way to temporarily suppress the warnings, as I don't think php.ini affects ZC log files?

    Thanks.

    ----

    Index page:

    #1 require_once(/home/zencart/includes/init_includes/init_sessions.php) called at [/home/zencart/includes/autoload_func.php:37]
    #2 require(/home/zencart/includes/autoload_func.php) called at [/home/zencart/includes/application_top.php:222]
    #3 require(/home/zencart/includes/application_top.php) called at [/home/zencart/index.php:25]
    --> PHP Warning: Undefined array key "SSL_SESSION_ID" in /home/zencart/includes/init_includes/init_sessions.php on line 132.

    [21-May-2022 06:29:50 America/Los_Angeles] Request URI: /, IP address: xxx.xxx.xxx.xxx
    #1 products_viewed_counter->should_be_excluded() called at [/home/zencart/includes/classes/observers/class.products_viewed_counter.php:17]
    #2 products_viewed_counter->__construct() called at [/home/zencart/includes/autoload_func.php:44]
    #3 require(/home/zencart/includes/autoload_func.php) called at [/home/zencart/includes/application_top.php:222]
    #4 require(/home/zencart/includes/application_top.php) called at [/home/zencart/index.php:25]
    --> PHP Warning: Undefined array key "spider_flag" in /home/zencart/includes/classes/observers/class.products_viewed_counter.php on line 37.


    Load any category:
    [21-May-2022 06:47:13 America/Los_Angeles] Request URI: /index.php?main_page=index&cPath=21, IP address: xxx.xxx.xxx.xxx
    #1 require_once(/home/zencart/includes/init_includes/init_sessions.php) called at [/home/zencart/includes/autoload_func.php:37]
    #2 require(/home/zencart/includes/autoload_func.php) called at [/home/zencart/includes/application_top.php:222]
    #3 require(/home/zencart/includes/application_top.php) called at [/home/zencart/index.php:25]
    --> PHP Warning: Undefined array key "SSL_SESSION_ID" in /home/zencart/includes/init_includes/init_sessions.php on line 132.

    [21-May-2022 06:47:13 America/Los_Angeles] Request URI: /index.php?main_page=index&cPath=21, IP address: xxx.xxx.xxx.xxx
    #1 products_viewed_counter->should_be_excluded() called at [/home/zencart/includes/classes/observers/class.products_viewed_counter.php:17]
    #2 products_viewed_counter->__construct() called at [/home/zencart/includes/autoload_func.php:44]
    #3 require(/home/zencart/includes/autoload_func.php) called at [/home/zencart/includes/application_top.php:222]
    #4 require(/home/zencart/includes/application_top.php) called at [/home/zencart/index.php:25]
    --> PHP Warning: Undefined array key "spider_flag" in /home/zencart/includes/classes/observers/class.products_viewed_counter.php on line 37.

    [21-May-2022 06:47:13 America/Los_Angeles] Request URI: /index.php?main_page=index&cPath=21, IP address: xxx.xxx.xxx.xxx
    #1 require_once(/home/zencart/includes/languages/english/index.php) called at [/home/zencart/includes/modules/require_languages.php:22]
    #2 require(/home/zencart/includes/modules/require_languages.php) called at [/home/zencart/includes/modules/pages/index/header_php.php:123]
    #3 require(/home/zencart/includes/modules/pages/index/header_php.php) called at [/home/zencart/index.php:35]
    --> PHP Warning: Constant TABLE_HEADING_PRODUCTS already defined in /home/zencart/includes/languages/english/index.php on line 33.

  2. #2
    Join Date
    Apr 2009
    Posts
    417
    Plugin Contributions
    2

    Default Re: ZC 1.57d PHP 8.0 compatibility to what extent?

    Under Admin>Configuration>Logging there are two fields that need changing to IgnoreDups

    They are: Report All Errors (Admin)? ; Report All Errors (Store)?

    This should remove the duplicate errors.

    If this does not remove all of them, there is more info in https://github.com/zencart/zencart/issues/4712 that may help.
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  3. #3
    Join Date
    Jul 2011
    Posts
    146
    Plugin Contributions
    4

    Default Re: ZC 1.57d PHP 8.0 compatibility to what extent?

    Quote Originally Posted by brittainmark View Post
    Under Admin>Configuration>Logging there are two fields that need changing to IgnoreDups

    They are: Report All Errors (Admin)? ; Report All Errors (Store)?

    This should remove the duplicate errors.

    If this does not remove all of them, there is more info in https://github.com/zencart/zencart/issues/4712 that may help.
    Im not sure if duplicate errors is the issue. At least not within each reload of the page to trigger it. I took a read of the git link, and I dont believe the is the same issue, as this shopping cart Image Hander , or even Light Box.

    But I've changed the setting anyways, and the exact same lines of errors gets generated in a new myDEBUG-*-warn.log gets created each time the page reloads.
    It seems to have the finger print of zc 1.57d having some compatibility issues with PHP 8.x. Rolling back to PHP 7.4, and all its normal and quiet again.

  4. #4
    Join Date
    Apr 2009
    Posts
    417
    Plugin Contributions
    2

    Default Re: ZC 1.57d PHP 8.0 compatibility to what extent?

    PHP 7.4 is the one to use for 1.5.7.
    from 1.5.7 docs
    Code:
    Zen Cart v1.5.7 is designed for PHP 5.6 to 8.0, with MySQL 5.1 to 5.7 (or MariaDB 10.0-10.5) and Apache 2.2/2.4<br>
                    (Some older plugins may show deprecations and warnings when using PHP 8)
    I believe that 1.5.8 will be PHP 8 compatible.
    From the 1.5.8 docs.
    Code:
    Zen Cart v1.5.8 is designed for PHP 7.3 to 8.1, with MySQL 5.7.8+ (or MariaDB 10.2.7+) and Apache 2.2/2.4
    Note 1.5.8 is not yet released.
    Mark Brittain
    http:\\innerlightcrystals.co.uk\sales\

  5. #5
    Join Date
    Jul 2011
    Posts
    146
    Plugin Contributions
    4

    Default Re: ZC 1.57d PHP 8.0 compatibility to what extent?

    Quote Originally Posted by brittainmark View Post
    PHP 7.4 is the one to use for 1.5.7.
    from 1.5.7 docs
    Code:
    Zen Cart v1.5.7 is designed for PHP 5.6 to 8.0, with MySQL 5.1 to 5.7 (or MariaDB 10.0-10.5) and Apache 2.2/2.4<br>
                    (Some older plugins may show deprecations and warnings when using PHP 8)
    I believe that 1.5.8 will be PHP 8 compatible.
    From the 1.5.8 docs.
    Code:
    Zen Cart v1.5.8 is designed for PHP 7.3 to 8.1, with MySQL 5.7.8+ (or MariaDB 10.2.7+) and Apache 2.2/2.4
    Note 1.5.8 is not yet released.
    Thank you, for that bit of definitive information, now I can put this thought to ease.
    The motivation for me to pursue a PHP 8.x upgrade is because one of my clients is hosted on a managed Dreamhost VPS, and they have just announced that PHP 7.x will not be supported come Aug of 2022. This might be prudent for those who do not already know this.
    Hope 1.5.8 will be a forgiving upgrade.

  6. #6
    Join Date
    Feb 2011
    Location
    Lumberton, TX
    Posts
    525
    Plugin Contributions
    0

    Default Re: ZC 1.57d PHP 8.0 compatibility to what extent?

    Quote Originally Posted by chibipaw View Post
    Thank you, for that bit of definitive information, now I can put this thought to ease.
    The motivation for me to pursue a PHP 8.x upgrade is because one of my clients is hosted on a managed Dreamhost VPS, and they have just announced that PHP 7.x will not be supported come Aug of 2022. This might be prudent for those who do not already know this.
    Hope 1.5.8 will be a forgiving upgrade.
    This is the first I have heard of Dreamhost making that move. That affects me as well.

  7. #7
    Join Date
    Jul 2011
    Posts
    146
    Plugin Contributions
    4

    Default Re: ZC 1.57d PHP 8.0 compatibility to what extent?

    Quote Originally Posted by g2ktcf View Post
    This is the first I have heard of Dreamhost making that move. That affects me as well.
    This site was on ZC 1.55f, thus barfed horrible when Dreamhost tried to forcefully upgrade to PHP 8.0. ZC 1.57d works, but noisy with the warning you cant turn off isnt exactly elegant solution either.
    Here's a screen shot of what I got after their failed attempt.

    Name:  Dreamhost_php8.jpg
Views: 352
Size:  42.8 KB

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

    Default Re: ZC 1.57d PHP 8.0 compatibility to what extent?

    Quote Originally Posted by chibipaw View Post
    Just spent time upgrade one of my shopping cart from ZC 1.55f php 7.3 to ZC 1.57d with PHP 8.1
    I have notice the following pattern:
    ZC 1.57d seems to run flawlessly on Php 7.4. Its basic cart, so it doesnt really throw log entries at all, not even warnings or deprivation notices.

    However up on upgrading to PHP 8.0 (and even 8.1) , ZC 1.57d throws a whole lot of warnings. The warnings looks like they are from ZC core files.
    Is this a known issue with when running ZC 1.57d with PHP 8.0? Is there a way to temporarily suppress the warnings, as I don't think php.ini affects ZC log files?

    Thanks.

    ----

    Index page:

    #1 require_once(/home/zencart/includes/init_includes/init_sessions.php) called at [/home/zencart/includes/autoload_func.php:37]
    #2 require(/home/zencart/includes/autoload_func.php) called at [/home/zencart/includes/application_top.php:222]
    #3 require(/home/zencart/includes/application_top.php) called at [/home/zencart/index.php:25]
    --> PHP Warning: Undefined array key "SSL_SESSION_ID" in /home/zencart/includes/init_includes/init_sessions.php on line 132.

    [21-May-2022 06:29:50 America/Los_Angeles] Request URI: /, IP address: xxx.xxx.xxx.xxx
    #1 products_viewed_counter->should_be_excluded() called at [/home/zencart/includes/classes/observers/class.products_viewed_counter.php:17]
    #2 products_viewed_counter->__construct() called at [/home/zencart/includes/autoload_func.php:44]
    #3 require(/home/zencart/includes/autoload_func.php) called at [/home/zencart/includes/application_top.php:222]
    #4 require(/home/zencart/includes/application_top.php) called at [/home/zencart/index.php:25]
    --> PHP Warning: Undefined array key "spider_flag" in /home/zencart/includes/classes/observers/class.products_viewed_counter.php on line 37.


    Load any category:
    [21-May-2022 06:47:13 America/Los_Angeles] Request URI: /index.php?main_page=index&cPath=21, IP address: xxx.xxx.xxx.xxx
    #1 require_once(/home/zencart/includes/init_includes/init_sessions.php) called at [/home/zencart/includes/autoload_func.php:37]
    #2 require(/home/zencart/includes/autoload_func.php) called at [/home/zencart/includes/application_top.php:222]
    #3 require(/home/zencart/includes/application_top.php) called at [/home/zencart/index.php:25]
    --> PHP Warning: Undefined array key "SSL_SESSION_ID" in /home/zencart/includes/init_includes/init_sessions.php on line 132.

    [21-May-2022 06:47:13 America/Los_Angeles] Request URI: /index.php?main_page=index&cPath=21, IP address: xxx.xxx.xxx.xxx
    #1 products_viewed_counter->should_be_excluded() called at [/home/zencart/includes/classes/observers/class.products_viewed_counter.php:17]
    #2 products_viewed_counter->__construct() called at [/home/zencart/includes/autoload_func.php:44]
    #3 require(/home/zencart/includes/autoload_func.php) called at [/home/zencart/includes/application_top.php:222]
    #4 require(/home/zencart/includes/application_top.php) called at [/home/zencart/index.php:25]
    --> PHP Warning: Undefined array key "spider_flag" in /home/zencart/includes/classes/observers/class.products_viewed_counter.php on line 37.

    [21-May-2022 06:47:13 America/Los_Angeles] Request URI: /index.php?main_page=index&cPath=21, IP address: xxx.xxx.xxx.xxx
    #1 require_once(/home/zencart/includes/languages/english/index.php) called at [/home/zencart/includes/modules/require_languages.php:22]
    #2 require(/home/zencart/includes/modules/require_languages.php) called at [/home/zencart/includes/modules/pages/index/header_php.php:123]
    #3 require(/home/zencart/includes/modules/pages/index/header_php.php) called at [/home/zencart/index.php:35]
    --> PHP Warning: Constant TABLE_HEADING_PRODUCTS already defined in /home/zencart/includes/languages/english/index.php on line 33.
    What are your settings in admin->configuration->sessions? It appears that some of them are not default settings which in part is at least revealing some of the server issues. For example the server owns $_SERVER['SSL_SESSION_ID']. It would appear that the server is not seeing that value or perhaps there is another to which to listen at that point of processing.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Jul 2011
    Posts
    146
    Plugin Contributions
    4

    Default Re: ZC 1.57d PHP 8.0 compatibility to what extent?

    Quote Originally Posted by mc12345678 View Post
    What are your settings in admin->configuration->sessions? It appears that some of them are not default settings which in part is at least revealing some of the server issues. For example the server owns $_SERVER['SSL_SESSION_ID']. It would appear that the server is not seeing that value or perhaps there is another to which to listen at that point of processing.
    Am I doing something wrong?

    Cookie Domain True
    Force Cookie Use True
    Check SSL Session ID True
    Check User Agent True
    Check IP Address True
    Prevent Spider Sessions True
    Recreate Session True
    IP to Host Conversion Status true
    Add period prefix to cookie domain True
    Use root path for cookie path False

  10. #10
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: ZC 1.57d PHP 8.0 compatibility to what extent?

    What you should always be doing is having a duplicate of your shop on a local or other development server where you can use the php you want, to get ahead of this curve. All the things 157 will trigger in php8 have been fixed in ZC158 and most if not all were fixed one-by-one, meaning you can probably find your error and the fix in the zencart Github for 158.
    Using a development server means you can do all the work when it suits you, not in a panic when your hosting decides.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v157 Upgrading from 1.55e to 1.57d - problems with language files
    By Ormhaugen in forum Upgrading to 1.5.x
    Replies: 14
    Last Post: 21 Apr 2022, 05:41 PM
  2. v155 PHP 7.2 compatibility
    By Ropelocker in forum Upgrading to 1.5.x
    Replies: 4
    Last Post: 19 Aug 2018, 01:29 PM
  3. v150 php 5.3 compatibility issue with ZC 1.5
    By wildmanVa in forum Upgrading to 1.5.x
    Replies: 1
    Last Post: 2 Sep 2012, 04:11 AM
  4. PHP 5.3.3 Compatibility?
    By wingc3 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 5 Sep 2010, 07:32 AM
  5. Zen 1.3.5 compatibility with PHP 5.2
    By spottedhaggis in forum General Questions
    Replies: 2
    Last Post: 16 Jun 2007, 03:38 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