I am doing a tutorial and am getting this error:
Fatal error: Class 'MySQLi' not found (LONG URL) on line 8
The code on line 8 is:
$mysqli = new MySQLi($db_server, $db_user, $db_pass, $db_name);
I saw online someone said to see if it was turned on in my phpinfo(), but there wasn't anything listed in there under for "mysqli".
Also, I am running PHP version 5.2.5
Check if MySQLi is Installed You can do that by visiting a phpinfo() page that you made, or by running this command: php -m | grep mysqli.
It'll automatically enable the mysqli extension for the PHP because connect using mysql is deprecated in PHP 7. If not an Ubuntu user then you can just rename php-prodcution. ini file to php. ini and enable the extension by removing semicolon in the php.
Installing MySQL on Windows Simply download the installer package, unzip it anywhere, and run setup.exe. Default installer setup.exe will walk you through the trivial process and by default will install everything under C:\mysql.
The oldest one uses the MySQL extension, which was deprecated as of PHP 5.5 and fully removed in PHP 7. The mysql() function no longer works in PHP 7. It has been replaced with mysqli().
Sounds like you just need to install MySQLi.
If you think you've done that and still have a problem, please post your operating system and anything else that might help diagnose it further.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With