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
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.
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...
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.
Re: PHP Warnings and Fatal errors after upgrading to PHP 8
Quote:
Originally Posted by
barco57
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.
Re: PHP Warnings and Fatal errors after upgrading to PHP 8
Quote:
Originally Posted by
bigandrew
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.
Re: PHP Warnings and Fatal errors after upgrading to PHP 8
Re: PHP Warnings and Fatal errors after upgrading to PHP 8
Quote:
Originally Posted by
torvista
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!!
Re: PHP Warnings and Fatal errors after upgrading to PHP 8
Quote:
Originally Posted by
swguy
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!
Re: PHP Warnings and Fatal errors after upgrading to PHP 8
Quote:
Originally Posted by
carlwhat
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!!