I am trying to upgrade the PHP version on a Digital Ocean server from 5.6.19 to the latest PHP 7.2. A lot of instructions found online point to "php72", which makes me wonder if 5.6.19 will be seamlessly replaced with a yum update php
. I doubt it.
Which means I may have to first 5.6.19, in which case I run the risk of totally deleting old settings. This is scary in case th enew setup does not go well, there's not much to flip back to.
I find there are important settings in these places:
/etc/php-fpm.d/www.conf
/etc/php.ini
/etc/php-fpm.conf
/etc/nginx/common.conf
/etc/nginx/fastcgi.conf
And of course the Nginx.conf (the main Ngnix config file) has calls to PHP-FPM accordingly. They include the #4 file above, common.conf, which in turn includes the fastcgi.conf.
Instructions on external websites, such as this one-- https://www.cyberciti.biz/faq/how-to-install-php-7-2-on-centos-7-rhel-7/ --do not take into account Nginx and PHP-FPM specifics especially in terms of old PHP 5.6.19 already existing.
All these instructions anyway speak of "php72", which I am afraid will change all the paths, and I'll have to update all paths to new php links everywhere.
Could you please advise how best to do this so I seamless upgrade the old PHP with the latest, with all the usual paths as above working? Otherwise we need to:
- Remove 5.6.19
- Install 7.2, and all additional modules (which will introduce the "php72" in the paths)
- Make sure all paths everywhere are new everywhere..
Any way to make this simpler in a OS-default way, without additional repos like "Remi" etc?
yum install php
in CentOS 7. And doing yum update does not change this to a new major version like 7. It just updates it to 5.6.latest./etc/opt/remi/php72/php-fpm.d/www.conf
.