I have PHP applications on Windows Server 2019, when I run the apps in the web browser I get the message "Error to connect to the database. Connection attempt failed: could not find driver". In the PHP errors log file is generated the following https://justpaste.it/bsjpg
I'm referring to the solution described on the link below, which seems familiar for Linux, but I am unable to fix my issue. PHP module is already loaded warning
When I run phpinfo() inside the IIS Manager the output shows no results.
I forgot to mention that my database is PostgreSQL. And the fact that it is a Dedicated Server in a cloud, managed with Plesk.
Please, anyone can help me fix the issue?
That indicates that the PHP extension for the database driver you are using is not installed or enabled. In your case it seems like the PDO MySQL driver is missing.
You can install the PDO MSQL extension and then to enable it open your php.ini file and uncomment the following line 'extension=pdo_mysql' and lastly you need to restart the IIS web server.
Another thing you can do is to check that the MySQL client libraries are installed on your Windows server. Place the required DLL files (like libmysql.dll or mysqlnd.dll) in the PHP extension directory or in the Windows system path. All the best.