PHP downgrade php7 to php5.6
SWITCHING BETWEEN PHP VERSIONS
Example : Ubuntu 16.04 > how to switch PHP7.0 to php5.6
This method is not to remove any php versions but installing as add-on but use any one version at any time.
sudo apt-get install python-software-propertiessudo add-apt-repository ppa:ondrej/phpsudo apt-get updatesudo apt-get install -y php5.6php -v
--This may show your old version.
--So now to switching the versions 7.0 > 5.6
sudo a2dismod php7.0sudo a2enmod php5.6sudo service apache2 restartsudo update-alternatives --set php /usr/bin/php5.6
--Basically need to install few modules first
sudo apt-get install php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6
--Enabling your required extensions example >>> sudo phpenmod mbstring
sudo apt-get updatesudo update-alternatives --set php /usr/bin/php5.6sudo service apache2 restart
1 comments:
nice information for the freshers.thank you.
learn php7 tutorial
You must visit to https://vvcares.com - accept the our policy to approve your comment submission successfully.