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 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

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

PREVIOUS NEXT
Code Example
Php :: exception in php or try catch in php 
Php :: symfony connect rabbitMQ 
Php :: symfony messenger rabbitMQ 
Php :: nginx codeigniter remove index.php 
Php :: convert png to webp in php 
Php :: send mail using php mail function on localhost using xampp server 
Php :: laravel passport client 
Php :: PHP str_repeat — Repeat a string 
Php :: php get index of string 
Php :: IlluminateContractsContainerBindingResolutionException 
Php :: php sort array by longest 
Php :: function default value 
Php :: bagisto package generator 
Php :: how to remove duplicate data in php 
Php :: vs code php tag shortcut 
Php :: delay in php 
Php :: how create page 419 in laravel 
Php :: laravel has many with ids 
Php :: laravel count array 
Php :: php meta 
Php :: position for ip 
Php :: laravel order by before group by 
Php :: add phpmyadmin login linux 
Php :: executar comando linux php 
Php :: laravel middleware 
Php :: set cookie on button click php or js 
Php :: woocommerce disable links on specific product 
Php :: empty in php 
Php :: Laravel - Add conditional where clause in query 
Php :: Laravel 8 - get values of url query strings in controller 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =