Moving on in PHP

There’s nothing I love more than spending a morning updating software!

CPanel 72 is nearly out, and the writers noted that PHP 5.6 and 7.0 would no longer be supported. You may not be surprised to learn that every one of my sites ran one of these, and for good reason — I had problems upgrading them to 7.1 some time ago.

Sometimes I don’t have an illustration.

I tried it again, site by site, and discovered that the main “problem” is that it took CPanel a few minutes to catch up, so there was some downtime. Once I realized that, there were just a few sites that had major issues.

When I upgraded allpar.com, it was a nightmarish event, because I had a good deal of custom-written code (some by me, some by others who liked to split things across dozens of poorly named files). Every database call had to be rewritten, and while I was in there, I updated the email system to use SMTP, because php’s internal mail server was causing issues for some people.

This time, it was much easier — a bit over two hours, which isn’t wonderful, but I did find some odd permissions issues (odd, because they were set by CPanel!), which hindered things a bit. Once I tracked those down, one at a time, trying things until I found what worked, the last few holdouts were done, and now, I’m on PHP 7.1 across the board. Yes, I know 7.2 is the current version, but I find it’s sometimes better to lag a little — or at least to do one major change at a time. In addition, the speed boost of 7 vs 5.6 was massive; and the boost of 7.1 vs 7.0 is impressive; but 7.2 doesn’t really add much and I might just wait for 7.3 to come out and really mess things up. (7.1 is getting security updates into late 2019; 7.2 adds one year to that schedule, and I figure 7.3 will be relatively bug-fixed by mid-2019.)

Testing is always good, because I also found a couple of oddities, probably related to the server move (which included a bump-up to the latest Linux version), and cleared those up as well.

Such is the red queen’s race of running your own web server… but at least I handled this before it became an emergency, and was able to clear out two old versions of PHP from the server.

PS> And now we’re on 7.2 because it really had no downsides after all.


Leave a Reply

Your email address will not be published. Required fields are marked *