MySQLi constant, MYSQLI_OPT_INT_AND_FLOAT_NATIVE, is undefined

Deleted
From Unknown

I got this error day after installing on admin page:

MySQLi constant, MYSQLI_OPT_INT_AND_FLOAT_NATIVE, is undefined

My settings to fix:  In CPanel, for PHP 8.1, PHP extensions, disabled mysqli, enable mysqlnd, nd_mysqli, nd_pdo_mysql.  

PHP v7.4 by default i think has these settings and does not give error.

tim
Founder
From Sweden
Member since May 2013
tim

Correct, mysqlnd is the native driver optimized for mysql. Old libmysql returns numbers as strings, which throws some fatal errors in PHP 8.1 e.g. '4.99' + '9.99'. Therefore a warning is thrown if mysqlnd is missing.

nd_pdo_mysql is not needed by LiteCart.

Developer
From United States
Member since Apr 2023

I know this post is a little over a year old, but I have upgraded my PHP to 8.1 and have made all the correct selections based on the installer sheet info.  There are 3 exceptions however, In Modules, mod_deflate was not detected, mod_env was not detected and nd_pdo_mysql threw an error message that it wasn't allowed as it was a conflict. I am using Apache Version 2/ LiteSpeed.  Any ideas anyone?

Developer
From United States
Member since Apr 2023

I thank you for replying.  I don't have a clue why the error is still on the home page.  It is annoying.  Do you think i should uninstall and reinstall?  TY!

tim
Founder
From Sweden
Member since May 2013
tim

It's because you have enabled libmysql which was deprecated years ago in favour of mysqlnd (Native Driver).
You need to disable (lib)mysql and enable mysqlnd. cPanel users usually enable these two: mysqlnd + nd_mysqli.
Ask your web host how to do this. This does not recide in the LiteCart installation.
Did the other forum topics not help you at all?

This thread has been closed due to long inactivity. Posting to it is not possible.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.