php disable_functions in PHP-FPM

sodapopinski

Well-Known Member
Aug 13, 2001
90
2
308
Everytime I use PHP-FPM and created an account. The system will automatically add disable_functions exec,passthru,shell_exec,system.
I want to know the exact template file where I can edit that. Because if I add disable_functions line into /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml, everytime cpanel create a new acount it will add SEPARATE line into each domain config instead of replace the default one which cause service unavailable error.

Can anybody help me?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

Check to ensure you follow the instructions from this post:

Enabling PHP-FPM forces disable_functions

Because if I add disable_functions line into /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml, everytime cpanel create a new acount it will add SEPARATE line into each domain config instead of replace the default one which cause service unavailable error.
What does the line in this file look like on your system? Make sure it includes the "php_admin_value_disable_functions" entry. EX:

Code:
php_admin_value_disable_functions : exec,passthru,system
Thank you.
 

jazee

Well-Known Member
Jan 12, 2015
119
4
68
cPanel Access Level
Root Administrator
This really drove me batty too trying to figure out why a script wasn't working when upgrading to PHP 7 recently. Is there some reason that controlling this couldn't be done through settings somewhere within WHM/Cpanel instead of using the clunky manual command line fix?