Introduction
When a domain is using PHP-FPM, sometimes there are certain options that would needed to be manually added into PHP-FPM via CLI.
Procedure
1. You would first need to locate the individual domain's PHP FPM's configuration file, they are locate below:
/var/cpanel/userdata/$cPUser/$domain.com.php-fpm.yaml
Please substitute $cPUser with the actual cPanel username, and $domain.com with the actual domain name.
For example: cPanel user is cPTech, domain name is cptech.com
/var/cpanel/userdata/cPTech/cptech.com.php-fpm.yaml
2. Adding in the new PHP value, it would follow the following format:
php_admin_value_$php_$extension_$youwant: {name: 'php_admin_value[$php_$extension_$youwant]', value: 1}
You would want to substitute the actual PHP extension into $php_$extension_$youwant
For example, turn on allow_url_include and expose_php:
php_admin_value_allow_url_include: { name: 'php_admin_value[allow_url_include]', value: 1 }
php_admin_expose_php: { name: 'php_admin_value[expose_php]', value: 1 }
3. Afterwards, you will want to rebuild the PHP-FPM configuration:
/usr/local/cpanel/scripts/php_fpm_config --rebuild