Post by anhung » Fri Feb 07, 2025 12:58 am

Hi everyone,
I'm using OC 3.0.3.8 with PHP 7.4 without any problem for 2 years. Yesterday my website suddenly stop working with this error:

Unknown: Creation of dynamic property Request::$request is deprecated in /home/ABC/XYZ/system/library/request.php on line 26

Below is the content of error_log file:

Code: Select all

[06-Feb-2025 16:33:11 UTC] PHP Fatal error:  Uncaught Error: Class "MySQLi" not found in /home/ABC/XYZ/system/library/db/mysqli.php:8
Stack trace:
#0 /home/ABC/XYZ/system/library/db.php(31): DB\MySQLi->__construct('localhost', 'ABC_ocar19...', 'ak92s@3oHkX', 'ABC_ocar19...', '3306')
#1 /home/ABC/XYZ/system/framework.php(80): DB->__construct('mysqli', 'localhost', 'ABC_ocar19...', 'ak92s@3oHkX', 'ABC_ocar19...', '3306')
#2 /home/ABC/XYZ/system/startup.php(104): require_once('/home/ABC/...')
#3 /home/ABC/XYZ/index.php(19): start('catalog')
#4 {main}
  thrown in /home/ABC/XYZ/system/library/db/mysqli.php on line 8
In PHP Extensions I selected these lib: mysqlnd, nd_mysqli, pdo_mysql already.

I spend 4 hours to fix with editing request.php, changing PHP extensions, upgrading to PHP 8.2. I also install fresh OC 3.0.4.0 and the demo working fine but my website still show that error. I really get stuck now. Hope anyone can help or show me the way to fix it.
Thank you in advanced. I really appreciate it.

Newbie

Posts

Joined
Sun Nov 28, 2021 3:04 pm

Post by anhung » Sat Feb 08, 2025 2:02 am

Problem solved! My hosting provider accidentally changed PHP to version 8.3. I asked they to change it back to 7.4 and my website works again!

Newbie

Posts

Joined
Sun Nov 28, 2021 3:04 pm

Post by by mona » Sat Feb 08, 2025 2:28 am

Great glad to hear it.
Searching google for the error will usually point you in the right direction.

Be aware that php7.4 is depreciated and this is for security reasons.
OC 3.0.4.0 supports php8 and it is advisable to do this before your host stops providing it rather than wait until your website is down.
You can download it here => https://www.opencart.com/index.php?rout ... ad/history

Note: OC4 is still not recommended for production sites.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: Bing [Bot] and 16 guests