Q:

Fatal error: Uncaught Error: Call to undefined function mysqli_connect() on Windows 10

I'm trying to connect to MariaDB database with PHP using 'PHP Server' extension in VScode, but it keeps giving me this error.
I can connect to database manually without any problems.
So far I have tried:

uncommenting 'extension_dir = "ext"' and 'extension=mysqli' in
php.ini.production and php.ini.development files
putting 'php_mysqli.dll' in php, php/ext, system32, sys64WOW folders
(Saw this solution on another forum)
reinstalling PHP and VS code

The code looks like this
define('DB_SERVER', '10.147.19.125');
define('DB_USERNAME', 'user');
define('DB_PASSWORD', 'pass');
define('DB_NAME', 'serwer');

echo "Connecting to database..";
/* Attempt to connect with database */
$link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);

Output of :
phpinfo()

A:

Thanks for the comments. Turns out that VS code was looking for ini file in C:/windows so i just copied php.ini.development file there and changed it's name. Works fine now.

