cara menganti versi php di linux mint atau ubuntu


cara menganti versi php di linux mint atau ubuntu

Switch From PHP 5.6 => PHP 7.2

The PHP 5.6 is set as default version in your system, and you need to switch to PHP 7.2. Run the following commands to switch for Apache and command line.
Apache:-
sudo a2dismod php5.6
sudo a2enmod php7.2
sudo service apache2 restart
Command Line:-
sudo update-alternatives --set php /usr/bin/php7.2
sudo update-alternatives --set phar /usr/bin/phar7.2
sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.2
sudo update-alternatives --set phpize /usr/bin/phpize7.2
sudo update-alternatives --set php-config /usr/bin/php-config7.2

Switch From PHP 7.2 => PHP 5.6

Default PHP 7.2 is set on your system and you need to switch to PHP 5.6. Now run the following commands to switch for Apache and command line.
Apache:-
sudo a2dismod php7.2
sudo a2enmod php5.6
sudo service apache2 restart
Command Line:-
sudo update-alternatives --set php /usr/bin/php5.6
sudo update-alternatives --set phar /usr/bin/phar5.6
sudo update-alternatives --set phar.phar /usr/bin/phar.phar5.6 
sudo update-alternatives --set phpize /usr/bin/phpize5.6
sudo update-alternatives --set php-config /usr/bin/php-config5.6

sumber : https://tecadmin.net/switch-between-multiple-php-version-on-ubuntu/

Belum ada Komentar untuk "cara menganti versi php di linux mint atau ubuntu"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel