Post by JazzBlueRT » Sat Oct 22, 2022 3:02 pm

Get errors like these

Unknown: Creation of dynamic property mysqli::$report_mode is deprecated

which I have no clue what is generating those errors. Display errors is turned off in php and they still show.

My site is now totally hosed

------------------------------------------
Retro gifts, toys, games and accessories
https://www.retroactives.com/


User avatar
New member

Posts

Joined
Mon Nov 06, 2017 1:34 am

Post by OSWorX » Sat Oct 22, 2022 4:23 pm

JazzBlueRT wrote:
Sat Oct 22, 2022 3:02 pm
Get errors like these

Unknown: Creation of dynamic property mysqli::$report_mode is deprecated

which I have no clue what is generating those errors. Display errors is turned off in php and they still show.

My site is now totally hosed
The version you are using is NOT ready for production (live sites)!
Instead use 3.0.3.8 and NOT php 8.2.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by JazzBlueRT » Sat Oct 22, 2022 6:09 pm

Nowhere does it say that 4.0.1.1 was not production ready nor does it say that it is not compatible with php 8.2.

When something is labeled as compatible with PHP 8.1+ you presume that includes 8.2

A release this broken should have been labeled beta.

------------------------------------------
Retro gifts, toys, games and accessories
https://www.retroactives.com/


User avatar
New member

Posts

Joined
Mon Nov 06, 2017 1:34 am

Post by JNeuhoff » Sat Oct 22, 2022 6:15 pm

PHP 8.2 has not been released. And OpenCart 4.0.1.1 is not a stable release for a live website.

As regards PHP 8.2: Daniel will address it once PHP 8.2 becomes available, see https://github.com/opencart/opencart/issues/11803

In the meantime, you can use PHP 8.1 and the 3.0.x.x_Maintenance release of OpenCart.
Last edited by JNeuhoff on Sat Oct 22, 2022 9:44 pm, edited 1 time in total.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JazzBlueRT » Sat Oct 22, 2022 9:10 pm

PHP 8.2rc4 is in the Remi repo which needs to be enabled along with epel to update to Centos-Stream. A lot of people gonna have broken installs when they hit yum distro-sync -y because it is the only path out of the "nothing provides redhat-release" hell that Centos 8 devolved into.

If a product is not production ready, it should not be on the front page and it should be labeled as beta.

Fighting with Linux was fun in the 90's, in 2022 stuff should just work.

Furthermore, if it is going to get fixed after 8.2 official release, a lot of systems will break upon release.

------------------------------------------
Retro gifts, toys, games and accessories
https://www.retroactives.com/


User avatar
New member

Posts

Joined
Mon Nov 06, 2017 1:34 am

Post by JazzBlueRT » Sat Oct 22, 2022 9:28 pm

I restored back to 3.0.3.8

For anyone else with this problem, you will need to comment out LN:42 in system/framework.php to get rid of the deprecated errors.

Code: Select all

	if ($config->get('error_display')) {
		//echo '<b>' . $error . '</b>: ' . $message . ' in <b>' . $file . '</b> on line <b>' . $line . '</b>';
	}
	
I also do not get the purpose of this code. Is it supposed to be:

Code: Select all

	if ($config->get('config_error_display')) {
		echo '<b>' . $error . '</b>: ' . $message . ' in <b>' . $file . '</b> on line <b>' . $line . '</b>';
	}
	

------------------------------------------
Retro gifts, toys, games and accessories
https://www.retroactives.com/


User avatar
New member

Posts

Joined
Mon Nov 06, 2017 1:34 am

Post by ADD Creative » Sun Oct 23, 2022 5:24 am

You should never have error display on on a live production site. Don't comment out a debug feature just disable error display.

You need make sure display errors in set to off in all 3 places. Your PHP settings, in system/config/default.php and in the settings. Not only can this cause minor notices and warnings to cause bigger errors, as you have seen, it can also be a security risk.

1. In your PHP settings make sure display_errors is set to Off. Use phpinfo() to check. It should be off by default, but there are lots of rubbish hosts out there.

2. In system/config/default.php set error_display to false.

3. In your OpenCart Setting on the server tab set Display Errors to No.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JazzBlueRT » Sun Oct 23, 2022 1:18 pm

ADD Creative wrote:
Sun Oct 23, 2022 5:24 am
You should never have error display on on a live production site. Don't comment out a debug feature just disable error display.

You need make sure display errors in set to off in all 3 places. Your PHP settings, in system/config/default.php and in the settings. Not only can this cause minor notices and warnings to cause bigger errors, as you have seen, it can also be a security risk.

1. In your PHP settings make sure display_errors is set to Off. Use phpinfo() to check. It should be off by default, but there are lots of rubbish hosts out there.

2. In system/config/default.php set error_display to false.

3. In your OpenCart Setting on the server tab set Display Errors to No.
Yeah, I found the config/default file after I posted this. You are correct about that being the correct way.

------------------------------------------
Retro gifts, toys, games and accessories
https://www.retroactives.com/


User avatar
New member

Posts

Joined
Mon Nov 06, 2017 1:34 am

User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 35 guests