“Zmień wersję PHP na Ubuntu” Kod odpowiedzi

przełącz wersję php Ubuntu

# From PHP 7.1 => PHP 5.6

#Apache
sudo a2dismod php7.1
sudo a2enmod php5.6
sudo service apache2 restart
 
 #command Line
 sudo update-alternatives --set php /usr/bin/php5.6
BlueMoon

Zmień wersję PHP Ubuntu

//In ubunutu
Default PHP 7.1 is set on your system and you need to switch to PHP 5.6

$ sudo a2dismod php7.1
$ sudo a2enmod php5.6
$ sudo service apache2 restart
  
sudo update-alternatives --set php /usr/bin/php5.6
Disgusted Dragonfly

Zmień wersję PHP Ubuntu

$ sudo update-alternatives --config php
 or
$ sudo a2enmod php7.1(version)
tsnl_incredible

Zmień wersję PHP w Ubuntu

sudo update-alternatives --config php
sudo update-alternatives --config phar
sudo update-alternatives --config phar.phar
Gleaming Gecko

Zmień wersję PHP Ubuntu

sudo update-alternatives --config php
Mr. Samy

Zmień wersję PHP na Ubuntu

alias setphp="sudo update-alternatives --config php;sudo update-alternatives --config phar; update-alternatives --config phar.phar; a2dismod php*.*;systemctl restart apache2"

  Put the above alias in the

  sudo nano ~/.bashrc
  
  #After the above command just run this command
  
  a2enmod php<Your Desired Version> # like, a2enmod php7.4
  
  Now you can run command "setphp" from your terminal.
Dharmesh Tukadiya

Odpowiedzi podobne do “Zmień wersję PHP na Ubuntu”

Pytania podobne do “Zmień wersję PHP na Ubuntu”

Więcej pokrewnych odpowiedzi na “Zmień wersję PHP na Ubuntu” w PHP

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu