PHP 7.3 to 7.4 - Common Issues?
Been procrastinating on updating from PHP 7.3 to 7.4. How some very complicated (developed over 7 years) PHP code and I subscribe to the saying "if it's not broke, don't try to fix it." Going to PHP 8 is going to be folded into going from Centos 7 to Almalinux 8 as that will be a major endeavor that will take days of testing. But in the meantime, I was thinking of at least going to PHP 7.4. Wondering if there are any gotcha's to watch out for such as functions that were deprecated in 7.3 and then don't work in 7.4?
-
On any modern cPanel system you should be able to have both PHP 7.3 and 7.4 installed. You can then simply choose which version to run within cPanel. 0 -
I know that. I was just curious if anyone ran into code errors they had to fix going from 7.3 to 7.4. I suppose worse case you just change it back to 7.3 after installing 7.4. 0 -
It very much depends on your code and what it uses. PHP provides a summary of the differences here: PHP: Migrating from PHP 7.3.x to PHP 7.4.x - Manual. If you switch version, just test your site and check the error logs and switch back if there is anything that breaks functionality. Given PHP v7.4 is end of life in just over a month I would look instead to move to 8.0 or 8,1 as soon as possible. This is supported on both CentOS v7 and Almalinux v8 so doesn't need to be tied to an OS upgrade. 0 -
As others have said, it's really more about the code you're using than the cPanel side of things. The only *real* way to find out will be to upgrade and test it out. 0 -
As others have said, it's really more about the code you're using than the cPanel side of things. The only *real* way to find out will be to upgrade and test it out.
Yes, this is the obvious answer but I wanted to get a preview of what I may be in for. I wouldn't expect much issue with going 7.3 to 7.4 and WHM makes it easy to switch back if necessary. It's more application specific than Cpanel specific but I figure this is one of the forums where you can find a variety of users running a variety of PHP apps that can give insight on their experience. 8.x may be a different story though. It depends on how much that was deprecated in 7.3/7.4 is no longer functional in 8.x. While I understand many of these version upgrades address bugs and security fixes, these may be more important in a large Enterprise-level application environment. With small internal applications (which this is), the saying "if it's not broke, don't try to fix it" comes into play. After 30 years of coding and Sys Admin experience, this saying has served me well and saved countless wasted hours of creating necessarily creating new problems. What is "necessary" can be a matter of opinion and depends on the specific environment. My philosophy has evolved to not letting things get too far outdated, but not being obsessed with being on the latest release of everything. A whole industry of Sys Admin and consulting services was created by Microsoft over the years due to their finicky, unstable Windows Server. Company's making millions of dollars to keep things running smoothly for companies. Constantly performing updates and fixing issues before and thereafter. It's been so nice to have stuck with LAMP stack the past 15+ years. So much easier to maintain. If a lot of companies got off Windows Server and switched to Cpanel (where the business IT requirements practically allowed), a lot of Sys Admins would be out of a job. LOL. But I'm getting off topic.0 -
That's my belief for servers too - you don't necessarily want "bleeding edge" but a nice stable solution that isn't outdated. 0
Please sign in to leave a comment.
Comments
6 comments