PHP update 7.1.17 > 7.1.20 caused MySQL connection issue

Hello,

I am running IIS on Windows Server 2016 hosting a MediaWiki site with a locally hosted MySQL 8.0 database. I was using PHP version 7.1.17 (non-thread safe) and it ran with no issues. After updating to version 7.1.20, I started to receive errors when accessing the MediaWiki site which indicates a failure to connect to the database server. The php.ini file is the same between versions (and thus the same extensions being loaded) and our phpinfo.php page loads without any issues, so I know that PHP is responding correctly. Reverting back to 7.1.17 resolves the problem. While running 7.1.20, the PHP error log does not indicate any problems. Can anyone offer any advice, or does anyone know what may have changed between these two versions to cause this issue?

Edit: for clarification, I just attempted using 7.1.18 and 7.1.19 and it still worked using those versions. Something has changed with 7.1.20 to cause this issue.

Thank you for any advice!

Blake Boman

You can examine the php.net change log to find what has changed in each version - http://php.net/ChangeLog-7.php#7.1.20

There are known issues in the 7.1x branch. You should run no less then 7.2.x

I just attempted using version 7.2.8 and it exhibits the same behavior. 7.2.7 does not. It seems some change made in the most recent versions is breaking MediaWiki’s database connectivity.

What are the EXACT errors? How about posting the relevant code.

The PHP error log with error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT gets no errors reported.

MediaWiki’s homepage just says:

Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Cannot access the database)

I’ll try to find the relevant code, but I didn’t write it and I am not a programmer, so without anything more specific from error logs it may take a little while.

Sponsor our Newsletter | Privacy Policy | Terms of Service