I'm trying to downgrade PHP version from 7.4 to 7.2. This is what did
sudo amazon-linux-extras | grep phpand it showsPHP 7.4as the enabled version.
- Disable PHP 7.4
sudo amazon-linux-extras disable php7.4 - Enable PHP 7.2
sudo amazon-linux-extras enable php7.2 - Installing related modules
sudo yum install php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap} - Checking the enabled version again
sudo amazon-linux-extras | grep php
Now it shows 7.2 as the enabled version.
- Restarting httpd
systemctl restart httpd.service
After this when I check php -v it still shows 7.4

Can anyone point out what I'm missing.
