0

I have a requirement where I need to update the PHP and PHP-fpm to the latest version of the server. this server is hosted using Nginx and WordPress. We are using amazon Linux 2 when I disable php7.4 and enable php8 in amazon-Linux-extras and install I'm getting an error. php error

I have a couple of questions: what happens when I uninstall and install PHP to the latest version does it after the site? Do we have any workaround for this PHP error?

Thanks in advance.

I'm expecting a solution to update my PHP to the latest version without any issues. I have just started learning DevOps. I'm not familiar with these errors

Ramkumar
  • 1
  • 6
  • Let me suggest performing a clean install of PHP 8 on a new server and methodically installing the WordPress, testing to make sure WP works correctly on the installed PHP version, install tools/extension, testing and then the custom application, testing ... . May want to take a snapshot after every successful testing step. – MZM Nov 25 '22 at 17:06

1 Answers1

0

I removed php-json by sudo yum remove php-json and installed of php

sudo yum install php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip}

Still the application works.

php-json is available in Amazon Linux Extra topic "php7.4"

$ sudo amazon-linux-extras install php7.4
Ramkumar
  • 1
  • 6