Upgrading php version

Amit

Verified User
Joined
Mar 24, 2020
Messages
129
Location
India
Hello,
I have 4 versions of php installed on my server centos7 .These are php 5.6,7.1,7.2 and 7.3.I want to install 7.4 in place of 7.1 what would be the command.
Thank you.
 
Hello Amit. You can just change it, but I would also remove the old version. You have to login via SSH and do it like this if php 7.1 is your php2 version and php1 is also php-fpm mode at the moment:

Code:
cd /usr/local/directadmin/custombuild
./build update
./build set php2_release 7.4
./build php n
./build rewrite_confs

Just to be sure to remove php 7.1, you could try the following afterwards
./build list_removals
if php 7.1 is there, then you can do:
./build remove_items
if it's not there, also fine.

Things to keep in mind.
1.) Not only php 7.4 but all php versions will be rebuild, that's normal, so don't be scared.
2.) PHP 7.4 will have it's own php.ini file, so if you made any custom changes in the php.ini file of your php 7.1, you have to also make time in your php 7.4 php.ini file.
3.) Any user who has chosen php 7.1 now, will be changed to php 7.4. So if they run into trouble, they should set their setting in DA to php 7.3 or update their stuff to be compatible with 7.4 before you change things.

You know where to be if you run in to issues, but I think every thing will change smoothly.
 
Hello Richard
Thanks for your reply.
I have gone through couple of searches and I found specific solution which does not require to recompile all other versions.It just compile the version you want to change save a lot of time.The command is
Code:
cd /usr/local/directadmin/custombuild
./build update
./build set php2_release 7.4
./build php_expert 7.4 php-fpm
./build rewrite_confs

Provided that you want to change php2
 
Back
Top