Error connecting to database after PHP upgrade

Hey there! I’m new to the community and have run into a problem where I’ve run out of ideas on troubleshooting.

PIWIK version 3.0.1 has been running great on my Windows 2012 R2 server. Upgraded PHP from version 7.1.1 to 7.1.8 and am receiving the following error when browsing PIWIK:

“Error in PIWIK: Cannot connect to the database; The mysql driver is not currently installed. This may be a temporary issue, try refreshing the page. If the problem persists please contact your Piwik administrator.”

I’ve researched the error and all solutions point to making sure the extensions pdo_php_mysql.dll and pdo_mysqli.dll are enabled in the php.ini file. They are. In fact, I’m using the same php.ini file as my previous php installation.

I’ve checked the FastCGI settings and NTFS file permissions and everything is configured the same as when I ran php 7.1.1.

Any ideas?

Hi,

I am not familiar with setting up php on windows, but the issue is definitely related to the MySQL extension. Maybe check if you have edited the correct php.ini (if the new version uses the same file) or look into the phpinfo page if it is really enabled.

Thanks. I compared my phpinfo pages and on the new version, mysqli is not showing up (mysqlnd is). So must be something with that extension. Gonna dig deeper and get a second set of eyes on my php.ini file.

got it! Apparently my default ext directory in my php.ini file was commented out.

1 Like