Search
 
SCRIPT & CODE EXAMPLE
 

PHP

switch php version ubuntu

# Interactive Way
sudo update-alternatives --config php
Comment

switch php version 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
Comment

php version change ubuntu

sudo update-alternatives --config php
 select a version
Comment

change php version 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
Comment

change php version ubuntu

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

switch php version

sudo update-alternatives --config php
sudo update-alternatives --config phar
sudo update-alternatives --config phar.phar
Comment

change php version in ubuntu

sudo update-alternatives --config php
sudo update-alternatives --config phar
sudo update-alternatives --config phar.phar
Comment

change php version ubuntu

sudo update-alternatives --config php
Comment

switch php version ubuntu

$ sudo update-alternatives --set php /usr/bin/php7.1
$ sudo update-alternatives --set phar /usr/bin/phar7.1
$ sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.1
Comment

how switch php version in ubuntu

 sudo update-alternatives --set php /usr/bin/php5.6
Comment

switch php version ubuntu 20.04

# This might be a longer process but it worked for me
# firstly completely remove the current PHP present in your OS (ubuntu)
# command to remove > sudo apt-get purge php7.*
# next command > sudo apt autoremove -y

# now install the php version you want with the command > sudo apt-get install php7.2 libapache2-mod-php7.2 php7.2-mcrypt php7.2-mysql
Comment

change php version in ubuntu

$ sudo update-alternatives --set phar /usr/bin/phar5.6
Comment

switch between php version 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.
Comment

change php version on 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.
Comment

ubuntu change php version

sudo a2dismod php7.1
sudo a2enmod php5.6
sudo service apache2 restart
 #command Line
 sudo update-alternatives --set php /usr/bin/php5.6
 
$ sudo update-alternatives --set php /usr/bin/php7.1
$ sudo update-alternatives --set phar /usr/bin/phar7.1
$ sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.1
Comment

PREVIOUS NEXT
Code Example
Java :: vm options javafx 
Java :: minecraft bedrock file location 
Java :: basic hello world program in java 
Java :: jlabel text center 
Java :: import java math 
Java :: java fullscreen jframe 
Java :: list java versions mac 
Java :: setting up javafx in eclipse vm argument 
Java :: jbutton set background transparent 
Java :: priority queue reverse order java 
Java :: java android show toast 
Java :: how to upgrade java 8 to 11 in ubuntu 
Java :: default structure of java 
Java :: empty character in java 
Java :: how to write on top of equal sign in latex 
Java :: java cmd install raspbian 
Java :: datentypen java 
Java :: beans tag definition for spring frame work 
Java :: concatenating two int in java 
Java :: how to force garbage collection in java 
Java :: how to parse double upto 2 decimal in java 
Java :: firebase storage dependency 
Java :: resultset get value 
Java :: android settextcolor programmatically 
Java :: javaee jsp convert int to string 
Java :: How to find the fibonacci of an integer value iteratively in Java? 
Java :: spring create bean only if another bean does not exists 
Java :: how to download java on mint 
Java :: make recycler view non scrollable 
Java :: java split array into two 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =