The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

exec() disabled when PHP-FPM enabled

Discussion in 'EasyApache' started by imgdat, Dec 2, 2016.

Tags:
  1. imgdat

    imgdat Registered

    Joined:
    Dec 2, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  2. imgdat

    imgdat Registered

    Joined:
    Dec 2, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,280
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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!
     
Loading...

Share This Page