Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP FPM - overriding default configuration

Discussion in 'EasyApache' started by AM2015, May 25, 2018.

  1. AM2015

    AM2015 Active Member

    Joined:
    Jan 1, 2015
    Messages:
    29
    Likes Received:
    4
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I am having difficulty overriding the default PHP FPM values.

    I need to enable passthru(), system() and exec() on my system.

    I also want to set a lower level of logging (so I no longer see E_Warning messages).

    I have found the instructions given in other posted in this forum and followed them. But the changes have not taken effect. I still get an error message from the script saying that it fails because of the disabled functions.

    Here is what I have done:

    1) Created and edited the file /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml with these two lines:

    Code:
    php_value_error_reporting : E_ALL & ~E_STRICT & ~E_WARNING & ~E_NOTICE
    php_admin_value_disable_functions : shell_exec
    
    2) Run /scripts/php_fpm_config --rebuild

    But no changes have taken place.

    So I'm pretty much at a loss to figure out what to do next.

    I know there have been other threads on this and I've read them and followed the instructions.... but I still can't seem to get around the default values.
     
  2. AM2015

    AM2015 Active Member

    Joined:
    Jan 1, 2015
    Messages:
    29
    Likes Received:
    4
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Never mind -- I figured it out -- there's a step #3 that isn't included in the instructions. After running the PHP_FPM script (The php_fpm_config Script - Version 72 Documentation - cPanel Documentation) to rebuild the conf files, it is also necessary to restart the PHP-FPM service.

    (Kind of obvious in hindsight -- I only missed it because I'm now to using PHP-FPM -- so I did a restart of Apache but didn't' realize that I actually need to restart the PHP-FPM separately).

    Anyway, problem solved. But the point is that the rebuild script doesn't do a restart on its own - so that needs to be done as a separate step.
     
  3. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,387
    Likes Received:
    92
    Trophy Points:
    103
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @AM2015

    I'm really happy to hear you were able to find the cause of the issue. Thanks for updating the thread with the resolution!


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice