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

switch between php version ubuntu nginx

sudo update-alternatives --config php
Comment

switch between php version ubuntu nginx

sudo service nginx restart
sudo service php7.1-fpm or php7.2-fpm  restart
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 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

PREVIOUS NEXT
Code Example
Php :: How To Force Redirect HTTP To HTTPS In Laravel Using ServiceProvider 
Php :: laravel 8 validation unique 2 columns 
Php :: get number of days between two dates php 
Php :: how to use attempt in laravel 
Php :: Displaying Custom Navigation Menus in WordPress Themes 
Php :: php get first element of iterator class 
Php :: Doctor Strange 
Php :: php key_exists 
Php :: yii1 refresh cache schema 
Php :: wp+get tags for custom post type 
Php :: php iterate through a loop 
Php :: php injection 
Php :: resource route laravel 8 
Php :: php <= 
Php :: how to install apache mysql php on ubuntu 18.04 
Php :: wordpress query get results 
Php :: inverse hyperbolic cosine php 
Php :: laravel pagination with search filter 
Php :: in array php 
Php :: Laravel route not calling function of controller 
Php :: where is in array laravel 
Php :: create new record via model in laravel 
Php :: laravel get from model 
Php :: php sort by key 
Php :: new order email filter woocommerce 
Php :: wp_query custom post type 
Php :: how to create a php website 
Php :: phpmyadmin export database 
Php :: php variable inside mysql query 
Php :: Generating Random String In PHP Using random_bytes() function. (Cryptographically Secure) 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =