Posted in Uncategorized

Downgrade PHP7 to PHP 5.6

 

Then I had to downgrade to PHP 5.6
There are 2 ways to do that. Remove PHP 7.0 completely & install PHP 5.6

sudo apt-get remove php7.0*
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php 5.6

Keep both PHP 7.0 & PHP 5.6, switch accordingly

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring  libapache2-mod-php5.6 libapache2-mod-php7.0

Now to use PHP7.0 use the following command

sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart

And to use PHP5.6 use the following

sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart

That’s it!

Advertisements

Author:

I am a passionate software developer currently located in Bengaluru. I love creating beautiful stuffs, reading and soccer. When I am not in front of the PC, you'll find me EITHER day dreaming ;-) OR playing soccer OR reading . FCB and NEUFC are my favorite clubs

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s