Home » Php » php – Cannot Find mysqli Class in PHP7 Installation on Windows

php – Cannot Find mysqli Class in PHP7 Installation on Windows

Posted by: admin July 12, 2020 Leave a comment

Questions:

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.

How to&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.