Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    71
    Plugin Contributions
    0

    Default PHP Warnings and Fatal errors after upgrading to PHP 8

    I recently upgraded from 1.5.4 using PHP 5.6 to 1.5.7c, still using 5.6 for about a week. Everything was working fine until I upgraded to PHP 8.0.

    Payment modules stopped working, and customers can no longer place orders.

    I've read the "PHP Warnings and Deprecated messages after upgrading" article, but I'm still not sure how to correct the issue. Here are a few errors:

    [28-Jul-2021 14:19:25 America/New_York] Request URI: /store/adminohb/index.php?cmd=modules&set=payment, IP address: 99.1.220.145
    #1 require(/home/andrewangelina/public_html/store/adminohb/modules.php) called at [/home/andrewangelina/public_html/store/adminohb/index.php:11]
    --> PHP Warning: Undefined property: cod::$sort_order in /home/andrewangelina/public_html/store/adminohb/modules.php on line 208.

    [28-Jul-2021 14:19:25 America/New_York] Request URI: /store/adminohb/index.php?cmd=modules&set=payment, IP address: 99.1.220.145
    #1 require(/home/andrewangelina/public_html/store/adminohb/modules.php) called at [/home/andrewangelina/public_html/store/adminohb/index.php:11]
    --> PHP Warning: Undefined property: cod::$sort_order in /home/andrewangelina/public_html/store/adminohb/modules.php on line 251.

    [28-Jul-2021 14:19:25 America/New_York] Request URI: /store/adminohb/index.php?cmd=modules&set=payment, IP address: 99.1.220.145
    #1 require(/home/andrewangelina/public_html/store/adminohb/modules.php) called at [/home/andrewangelina/public_html/store/adminohb/index.php:11]
    --> PHP Warning: Undefined property: cod::$sort_order in /home/andrewangelina/public_html/store/adminohb/modules.php on line 257.

    [28-Jul-2021 14:19:25 America/New_York] Request URI: /store/adminohb/index.php?cmd=modules&set=payment, IP address: 99.1.220.145
    #1 require(/home/andrewangelina/public_html/store/adminohb/modules.php) called at [/home/andrewangelina/public_html/store/adminohb/index.php:11]
    --> PHP Warning: Undefined property: cod::$sort_order in /home/andrewangelina/public_html/store/adminohb/modules.php on line 274.


    I'm sure it's a simple fix, please point me in the right direction. Thanks!!

    andrew

  2. #2
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    71
    Plugin Contributions
    0

    Default Re: PHP Warnings and Fatal errors after upgrading to PHP 8

    Update: I'm using Ceon Manual Card 4.0.1 as well.

    When I downgrade to PHP 7.4, the checkout process works again. These are the only 2 errors that hit in the logs:

    [28-Jul-2021 17:50:25 America/New_York] Request URI: /store/index.php?main_page=product_reviews_write&products_id=3057, IP address: 185.191.171.37
    #1 include_once() called at [/home/andrewangelina/public_html/store/includes/autoload_func.php:28]
    #2 require(/home/andrewangelina/public_html/store/includes/autoload_func.php) called at [/home/andrewangelina/public_html/store/includes/application_top.php:222]
    #3 require(/home/andrewangelina/public_html/store/includes/application_top.php) called at [/home/andrewangelina/public_html/store/index.php:25]
    --> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ceon_manual_cardConfigCheck has a deprecated constructor in /home/andrewangelina/public_html/store/includes/classes/class.ceon_manual_cardConfigCheck.php on line 28.

    [28-Jul-2021 17:50:25 America/New_York] Request URI: /store/index.php?main_page=product_reviews_write&products_id=3057, IP address: 185.191.171.37
    #1 include_once() called at [/home/andrewangelina/public_html/store/includes/autoload_func.php:28]
    #2 require(/home/andrewangelina/public_html/store/includes/autoload_func.php) called at [/home/andrewangelina/public_html/store/includes/application_top.php:222]
    #3 require(/home/andrewangelina/public_html/store/includes/application_top.php) called at [/home/andrewangelina/public_html/store/index.php:25]
    --> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ceon_manual_cardSessionCleaner has a deprecated constructor in /home/andrewangelina/public_html/store/includes/classes/observers/class.ceon_manual_cardSessionCleaner.php on line 32.

  3. #3
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,621
    Plugin Contributions
    0

    Default Re: PHP Warnings and Fatal errors after upgrading to PHP 8

    Just because you can use PHP8 with 1.5.7c doesn't mean you should. On a stock, no addons install sure, but as soon as you add plugins to it, you are most likely in for some mydebug logs. The last time the CEON Manual card plugin was updated was in 2012 long before php8 existed closer to when php5.2 was fresh...
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  4. #4
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,266
    Plugin Contributions
    29

    Default Re: PHP Warnings and Fatal errors after upgrading to PHP 8

    This is why you should do all your fiddling on a development server using the latest php, in advance of your production site, to get a long, leisurely heads-up to fix these things, which always will occur with every php change.
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,909
    Plugin Contributions
    108

    Default Re: PHP Warnings and Fatal errors after upgrading to PHP 8

    Quote Originally Posted by barco57 View Post
    Just because you can use PHP8 with 1.5.7c doesn't mean you should.
    Agreed. Use PHP 7.4 for now and give the devs some time to shake out the PHP8 issues.
    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.

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,011
    Plugin Contributions
    5

    Default Re: PHP Warnings and Fatal errors after upgrading to PHP 8

    Quote Originally Posted by bigandrew View Post
    Update: I'm using Ceon Manual Card 4.0.1 as well.

    When I downgrade to PHP 7.4, the checkout process works again. These are the only 2 errors that hit in the logs:

    [28-Jul-2021 17:50:25 America/New_York] Request URI: /store/index.php?main_page=product_reviews_write&products_id=3057, IP address: 185.191.171.37
    #1 include_once() called at [/home/andrewangelina/public_html/store/includes/autoload_func.php:28]
    #2 require(/home/andrewangelina/public_html/store/includes/autoload_func.php) called at [/home/andrewangelina/public_html/store/includes/application_top.php:222]
    #3 require(/home/andrewangelina/public_html/store/includes/application_top.php) called at [/home/andrewangelina/public_html/store/index.php:25]
    --> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ceon_manual_cardConfigCheck has a deprecated constructor in /home/andrewangelina/public_html/store/includes/classes/class.ceon_manual_cardConfigCheck.php on line 28.

    [28-Jul-2021 17:50:25 America/New_York] Request URI: /store/index.php?main_page=product_reviews_write&products_id=3057, IP address: 185.191.171.37
    #1 include_once() called at [/home/andrewangelina/public_html/store/includes/autoload_func.php:28]
    #2 require(/home/andrewangelina/public_html/store/includes/autoload_func.php) called at [/home/andrewangelina/public_html/store/includes/application_top.php:222]
    #3 require(/home/andrewangelina/public_html/store/includes/application_top.php) called at [/home/andrewangelina/public_html/store/index.php:25]
    --> PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ceon_manual_cardSessionCleaner has a deprecated constructor in /home/andrewangelina/public_html/store/includes/classes/observers/class.ceon_manual_cardSessionCleaner.php on line 32.
    for any number of reasons, i would strongly recommend against using a manual credit card module. you can try my module, you will not be disappointed:

    https://www.zen-cart.com/downloads.php?do=file&id=2272

    if you want to continue using this manual credit card module, you need to change lines 28 in:

    includes/classes/class.ceon_manual_cardConfigCheck.php

    and line 32 in:

    includes/classes/observers/class.ceon_manual_cardSessionCleaner.php

    i do not use the module but you need to rename the function to __construct. and continue passing any vars that are currently in there. ie:

    PHP Code:
    //change to:

    function __construct($var1$var2) { 
    there may not be anything where i have $var1 and $var2. but you need to change the name to __construct, which should resolve your error.

    but again, i strongly recommend against using a manual credit card module.

    best.
    help with WCAG is now here! PM if you want some help with this. (or any ZC issue).
    if you feel so inclined, feel free to send some cake....

  7. #7
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    71
    Plugin Contributions
    0

    Default Re: PHP Warnings and Fatal errors after upgrading to PHP 8

    Roger that, thank you!

  8. #8
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    71
    Plugin Contributions
    0

    Default Re: PHP Warnings and Fatal errors after upgrading to PHP 8

    Quote Originally Posted by torvista View Post
    This is why you should do all your fiddling on a development server using the latest php, in advance of your production site, to get a long, leisurely heads-up to fix these things, which always will occur with every php change.
    Got it, thanks!!

  9. #9
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    71
    Plugin Contributions
    0

    Default Re: PHP Warnings and Fatal errors after upgrading to PHP 8

    Quote Originally Posted by swguy View Post
    Agreed. Use PHP 7.4 for now and give the devs some time to shake out the PHP8 issues.
    Will do. As soon as I dropped down to 7.4, a customer submitted an order. Thanks!

  10. #10
    Join Date
    Oct 2014
    Location
    Georgia
    Posts
    71
    Plugin Contributions
    0

    Default Re: PHP Warnings and Fatal errors after upgrading to PHP 8

    Quote Originally Posted by carlwhat View Post
    for any number of reasons, i would strongly recommend against using a manual credit card module. you can try my module, you will not be disappointed:

    https://www.zen-cart.com/downloads.php?do=file&id=2272

    if you want to continue using this manual credit card module, you need to change lines 28 in:

    includes/classes/class.ceon_manual_cardConfigCheck.php

    and line 32 in:

    includes/classes/observers/class.ceon_manual_cardSessionCleaner.php

    i do not use the module but you need to rename the function to __construct. and continue passing any vars that are currently in there. ie:

    PHP Code:
    //change to:

    function __construct($var1$var2) { 
    there may not be anything where i have $var1 and $var2. but you need to change the name to __construct, which should resolve your error.

    but again, i strongly recommend against using a manual credit card module.

    best.
    Thank you for this, I will take a look!!

 

 

Similar Threads

  1. v157 After Upgrading to 157c I rebuilt a shipping mod ZEN_NEXTDAY.php after the FLAT.php
    By shrimp-gumbo-mmmhhh in forum Upgrading to 1.5.x
    Replies: 5
    Last Post: 22 Mar 2021, 06:09 PM
  2. v151 PHP warnings and fatal errors
    By hillbillyanns in forum General Questions
    Replies: 3
    Last Post: 25 Nov 2015, 11:46 AM
  3. admin redirect loop after upgrading to php 5.2 from php 4
    By TheGrub in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 4 Aug 2010, 08:45 PM
  4. admin page blank but apache 200 ok and no aparent PHP errors or warnings
    By tomgoetals in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 4 Jun 2010, 10:33 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