How to install multi PHP versions

Post Reply
dpeca
Site Admin
Posts: 173
Joined: Fri Jun 19, 2020 9:59 am
How to install multi PHP versions

Post by dpeca »

Download php-installer:

Code: Select all

wget -nv -O ./vesta-inst-php.sh https://c.myvestacp.com/tools/multi-php-install.sh
Now you need to edit the script before you run it.

Code: Select all

mcedit ./vesta-inst-php.sh
Put 1 in desired PHP versions.

Code: Select all

inst_56=0
inst_70=0
inst_71=0
inst_72=0
inst_73=0
inst_74=0
Save it, and then run script.

Code: Select all

sudo bash ./vesta-inst-php.sh

Tags:

BartMan__X
Posts: 1
Joined: Sun Aug 16, 2020 10:56 pm
Re: How to install multi PHP versions

Post by BartMan__X »

Fresh Install
Debian 10,1 CPU, 50GB Storage, 2GB RAM
myVesta 0.9.8-26-33

FAIL:

sudo bash ./vesta-inst-php.sh
Multi-PHP support is only for myVesta that is installed in nginx+Apache or Apache variant

dpeca
Site Admin
Posts: 173
Joined: Fri Jun 19, 2020 9:59 am
Re: How to install multi PHP versions

Post by dpeca »

As it said, you probably installed nginx+php-fpm variant of myVesta (without Apache), and in that case we don't have multi-PHP support.

lito
Posts: 2
Joined: Tue Sep 08, 2020 1:39 pm
Re: How to install multi PHP versions

Post by lito »

Can you please recommend the way how to uninstall certain versions of php. Initially I installed all possible versions, but now I don’t need php 7.0 and 7.1. How can I uninstall them completely without uninstalling 5.6, 7.2, 7.3 and 7.4.

dpeca
Site Admin
Posts: 173
Joined: Fri Jun 19, 2020 9:59 am
Re: How to install multi PHP versions

Post by dpeca »

https://github.com/myvesta/vesta/blob/m ... ll.sh#L104
you will see:

Code: Select all

apt -y install php5.6-mbstring php5.6-bcmath php5.6-cli php5.6-curl php5.6-fpm php5.6-gd php5.6-intl php5.6-mcrypt php5.6-mysql php5.6-soap php5.6-xml php5.6-zip php5.6-memcache php5.6-memcached
instead of -y install just use remove --purge

so, command will be:

Code: Select all

apt remove --purge php5.6-mbstring php5.6-bcmath php5.6-cli php5.6-curl php5.6-fpm php5.6-gd php5.6-intl php5.6-mcrypt php5.6-mysql php5.6-soap php5.6-xml php5.6-zip php5.6-memcache php5.6-memcached
or even better:

Code: Select all

apt remove --purge php5.6*
also remove:

Code: Select all

rm /usr/local/vesta/data/templates/web/apache2/PHP-FPM-56.stpl
rm /usr/local/vesta/data/templates/web/apache2/PHP-FPM-56.tpl
rm /usr/local/vesta/data/templates/web/apache2/PHP-FPM-56.sh
do the same for all other versions.

lito
Posts: 2
Joined: Tue Sep 08, 2020 1:39 pm
Re: How to install multi PHP versions

Post by lito »

Thank you.


Post Reply