3 Answers
- Newest
- Most votes
- Most comments
2
You can install PHP 8.0, 8.1, 8.2 from amazon-linux-extras
amazon-linux-extras | grep php
May need to remove existing php7 packages first, before you enable 8.x package
sudo yum remove php*
sudo yum clean all
sudo amazon-linux-extras enable php8.0
sudo yum clean metadata
sudo yum install -q -y php-cli php-fpm php-opcache php-common
0
Have you tried
take a snapshot of your instance, Take a copy of php.ini, List the modules that you installed with php, yum remove -y php and its modules (php -m will give the modules list), amazon-linux-extras disable php7version, amazon-linux-extras enable php8version, yum install php and its modules.
answered a year ago
0
Have you tried changing the version of PHP using the following command
sudo update-alternatives --config php
Relevant content
- asked 2 years ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Thank you! This solved the issue.