Solved Clean end the multiple different php versions option?

Anne

Verified User
Joined
Dec 3, 2015
Messages
71
Hi,

I'm very happy with the "multiple php version" option as described here how to install:

It helped met to upgrade all users what was needed and now everything is working on PHP7.4 like a charm.

The question is, how do I now get rid of all the installed old PHP versions and only keep 7.4 as default. Safe, without of course messing up my server and users ?

The reason I want to get rid of the older versions is than no one is using them anymore (as the idea was), so I don't want to maintain them or resulting in a security risk.

I installed 7.4 as php option 4, like this:

cd /usr/local/directadmin/custombuild
./build update
./build set php1_release 5.6
./build set php2_release 7.1
./build set php3_release 7.2
./build set php4_release 7.4
./build set php1_mode php-fpm
./build set php2_mode php-fpm
./build set php3_mode php-fpm
./build set php4_mode php-fpm
./build php n
./build rewrite_confs

And I want it to become the only and default version.
 
Last edited:
Hi,

I'm very happy with the "multiple php version" option as described here how to install:

It helped met to upgrade all users what was needed and now everything is working on PHP7.4 like a charm.

The question is, how do I now get rid of all the installed old PHP versions and only keep 7.4 as default. Safe, without of course messing up my server and users ?

The reason I want to get rid of the older versions is than no one is using them anymore (as the idea was), so I don't want to maintain them or resulting in a security risk.

I installed 7.4 as php option 4, like this:



And I want it to become the only and default version.
1. Login as admin and make sure you are at admin level.
2. Go to CustomBuilds.
3. Click on Edit options.
4. Set php1_release to the version you want to use.
5. Set the rest of php_release to no.
6. Click save.
And now you only need to run the following commands in the terminal (You can also do this in the web panel but I don't know where to find it.):
cd /usr/local/directadmin/custombuild
./build update
./build php n
./build rewrite_confs
 
To actually remove the software you no longer want to have installed, run this to list what's up for removal:

Code:
./build list_removals

Then if the list looks sane, it will suggest what to run to actually delete those items.
 
Thank you realcryptonight, that seems to be easy steps.

Kristian, this last step is needed to remove the actual files I guess?

There is a lot of traffic at the moment, so I will execute the above steps in the quit hours. I will post back than. Thanks so far!
 
Thanks again Realcryptonight and Kristian,

All went well without any trouble.

I run the list_removals command and I see a few lines like:

PHP 5.6 installed, but not enabled in options.conf: './build remove_php 5.6'
PHP 7.2 installed, but not enabled in options.conf: './build remove_php 7.2'
PHP 7.3 installed, but not enabled in options.conf: './build remove_php 7.3'
Pure-FTPd installed, but not enabled in options.conf: './build remove_pureftpd'

If you want to remove all the suggested programs above, run: ./build remove_items

I see it already tells me what commands to run. I did it and now it's clean again :cool:
 
Last edited:
Thanks again Realcryptonight and Kristian,

All went well without any trouble.

I run the list_removals command and I see a few lines like:



I see it already tells me what commands to run. I did it and now it's clean again :cool:
Could you mark this thread as solved? So others can see your issue got a solution. Thanks.
 
Back
Top