Created by: Administrator, Last modification: 18 Jan 2019 (16:34 UTC)

It has been some time since the PHP Surgery site was set up, originally to log the steps needed to move many legacy sites from PHP5.2 to 5.4, but it has not has as much attention as it should have. Now we are looking at all the fixes needed to get these legacy sites working with PHP7.2 and what may be needed for PHP7.3. I was not ready to even think about running 7.2 as there are still a few sites to be moved up to 7.0. A lot less than last year and hopefully even those will be ported in the coming months. However the interaction between Linux distribution and other essential services have resulted in an unplanned upgrade to one of the production machines. This was unfortunately instigated by problems with getting LetsEncrypt to provide a cert for a new site and then refuse to run a renew on the live site's certs. The hoops jumped through to sort the problem would fill another article and I don't have time to write that, but since the two other production servers are running happily with the same setup and still happily running certbot-auto on their live sites just makes the aggro even more irritating!

Currently the sites on the machine are running with PHP7.2.5 along with Nginx 1.14.0 and Firebird 3.0.4 on SUSE Leap 15.0, while the previous production stack is PHP7.0.31 on Nginx 1.13.9 and Firebird 2.5.6 on SUSE Leap 42.3 and this site is still running on the older setup. The first panic was that PHP would not access the Firebird 3 server, but as the databases are all backed up between machines a quick fix was just to access a Firebird 2.5 server to get them running again. This then brought up the sites but with various messages. The way the bitweaver framework is configured, there is one set of code running all the sites, so one fix would rectify the same message across all sites rather than simply switching them off short term. The start of a PHP7.2 Upgrade Guide has been started, but is ongoing as admin areas off the code are tested. I need to cross check just what error was raised on screen for changes but since everything is version controlled via Mercurial this should be relatively easy, and later upgrades to the other machines should be easy to duplicate. As yet I have no reason to believe that the changes can't simply be back ported to PHP7.0 anyway, but we will keep track of that as well.

In addition to PHP being upgraded, Firebird was also upgraded and there will be a separate crib sheet on getting Firebird 3 running in legacy mode with PHP. That was another area that had been tried in the past but without success. Now I have one of the sites running PHP7.2 with Firebird 3 and it's just a matter of restoring backups for each of the sites onto the new system.