exec() disabled when PHP-FPM enabled

imgdat

Registered
Dec 2, 2016
2
0
1
California
cPanel Access Level
Root Administrator
Turning on PHP-FPM in the MultiPHP Manager for a domain will disable exec() and possibly other functions. In the INI settings there is only
PHP:
disable_functions =
If PHP-FPM is turned off then exec() will work again. How can exec() be enabled with PHP-FPM?
 

imgdat

Registered
Dec 2, 2016
2
0
1
California
cPanel Access Level
Root Administrator
Oops I should have looked at more posts about PHP-FPM.

I edited /opt/cpanel/ea-php70/root/etc/php-fpm.d/blah.domain.tld.conf to have
php_admin_value[disable_functions] = passthru,shell_exec,system and restarted PHP-FPM with /etc/init.d/ea-php70-php-fpm restart

Now exec() works. However if PHP-FPM is turned off and on again it overwrites the conf file. Is there a way to make this setting persistent?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

I'm happy to see you were able to address the issue. Disabling PHP-FPM and then enabling it again will reset any custom PHP-FPM configuration values for the specific domain name. Feel free to open a feature request if you'd like an additional option to preserve those settings:

Submit A Feature Request

Thanks!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
  • Like
Reactions: i-Strategi