Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot Find mysqli Class in PHP7 Installation on Windows

Tags:

php

mysqli

I downloaded and installed php7 from: http://windows.php.net/qa/#php-7.0-ts-VC14-x64

The php codes are running fine. I am not able to connect database using 'mysqli' Class. It says

Class 'mysqli' not found

I've uncommented extension=php_mysqli.dll in php.ini file. Did I miss anything while installing php7.

like image 889
gskhanal Avatar asked Dec 13 '15 07:12

gskhanal


People also ask

How do I know if MySQLi is installed?

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.

Is MySQLi included in PHP?

For the MySQLi functions to be available, you must compile PHP with support for the MySQLi extension. The MySQLi extension was introduced with PHP version 5.0. 0. The MySQL Native Driver was included in PHP version 5.3.


1 Answers

I solved the issue, it was a silly mistake. The extension_dir was not set. I set it to extension_dir = "C:\php7\ext" and its working fine.

like image 158
gskhanal Avatar answered Oct 11 '22 15:10

gskhanal