I get the following error: Fatal error: Class 'mysqli' not found in my php script I have php5.3.3-7 installed and I get this when I run apt-cache show php5-mysql
Description: MySQL module for php5
This package provides modules for MySQL database connections directly from
PHP scripts. It includes the generic "mysql" module which can be used
to connect to all versions of MySQL, an improved "mysqli" module for
MySQL version 4.1 or later, and the pdo_mysql module for use with
the PHP Data Object extension.
There is nothing about mysql at all in php info. How do I find the extention and do I have to istall it? There are many references to mysqli in my php.ini. But something is wrong.
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.
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 MySQLi extension was introduced with PHP version 5.0. 0. The MySQL Native Driver was included in PHP version 5.3.
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.
Have you actually installed the php5-mysql
package? apt-cache show
will give you information on packages that aren't installed (you want dpkg -l
to list installed packages). If the package is installed, double-check that it's enabled (/etc/php5/conf.d/mysql.ini
is the place to look).
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
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