If you've upgraded from Fedora 24 to something newer you may have noticed that the included php version no longer supports MySQL connections. This is troublesome if you are also hosting an old version of WordPress. Here's how I managed to solve that.
Download, build and install the shared library module needed for PHP7 to be able to do MySQL connections:
$ sudo dnf install php-devel
$ git clone https://github.com/php/pecl-database-mysql mysql --recursive
$ cd mysql
$ sudo cp modules/mysql.so /usr/lib64/php/modules
Make sure the module is loaded after mysqlnd.so by creating an ini file with a larger number than mysqlnd.so's ini file.
# cat /etc/php.d/99-mysql.ini
; Enable legacy mysql extension module
Add a MySQL entry in /etc/php.ini if it's not already there. Copy your old entry if you've saved the old file or add this:
mysql.allow_local_infile = On
mysql.allow_persistent = On
mysql.cache_size = 2000
mysql.max_persistent = -1
mysql.max_links = -1
mysql.connect_timeout = 60
mysql.trace_mode = Off
Restart your webserver:
$ sudo systemctl restart httpd.service
PHP7 should now be able to use MySQL.
If you did this to get an old WordPress installation to work, you now need to watch the webservers error log (/var/log/httpd/error_log). I found that many classes in plugins had overridden base class methods but using an incorrect signature for the methods. I simple copied the signatures from the base classes and put them in the derived classes one by one when seeing them in the error log.
Some plugins also had logic errors that required some thinking, like "continue" or "break" when there was nothing to continue or break from. Older php versions probably just ignored those statements but php7 refuses to execute files with those kinds of errors. All in all, it took an hour to correct the problems in the plugins used.