0

I am new to EC2. I have installed the latest php version which 7.2.22 . But my php files are in supported in latest version. So whether running the file in php in ec2 linux 2 its not working. So i have decide to downgrade php 7.2 to php 7.1.xx or php 7.0.xx.

How to Downgrade it. or else How can i uninstall php 7.2.xx and reinstall php 7.1.xx or php 7.0.xx

Please give the command to better understands and execute the commands to check.

Thanks in Advance...

Arslan Maqbool
  • 519
  • 1
  • 7
  • 21
  • You should consider to update your code to work with PHP 7.2+, because from [official PHP support page](https://www.php.net/supported-versions.php), security support for 7.1 ends in **1 month** (1 Dec 2019) – Yupik Oct 23 '19 at 10:56

1 Answers1

0

I am instructing the command in ubuntu, Command will differ wrt. to OS

Please purge the 7.2 php than Re-install 7.0 or 7.1

sudo apt-get purge php7.0-common

Install php 7.1

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1

Install php 7.0

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.0

Hope it helps .....!!!