Introduction
This article aims to provide the steps needed to restore php.ini to the default settings.
Procedure
These instructions work for each PHP version. You need to change out ea-php74 with the PHP version you are using (i.e., ea-php73).
ea-php##-php-common provides the php.ini file, but you can't just reinstall it because it ignores the checksums' difference. The file needs not to exist, and then reinstall this package to download a fresh one.
Here are the commands (run as root) to rename the ini file and reinstall the necessary package:
mv -vi /opt/cpanel/ea-php74/root/etc/php.ini{,.bak}
yum reinstall ea-php74-php-common