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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP-FPM Issue

Discussion in 'EasyApache' started by Nirjonadda, Apr 21, 2017.

Tags:
  1. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    418
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I have enabled PHP-FPM for my website, now getting one error. Please let me know this fix.

    Code:
    ErrorException: exec() has been disabled for security reasons - library/SolidMean/ForumBackup/CronEntry/Backup.php:205
     
  2. mariusfv

    mariusfv Member

    Joined:
    Mar 24, 2013
    Messages:
    22
    Likes Received:
    4
    Trophy Points:
    3
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    It seems that your forum software use "exec()" function which is disabled by default in PHP-FPM for security reasons.

    WHM > MultiPHP Manager - check here first your PHP version for your domain!(in PHP-FPM you first should activate PHP version).

    after

    Go to WHM > MultiPHP INI Editor > Editor Mode(tab) > Edit the INI settings of a PHP version(here select the php version which you previously activate for your domain in MultiPHP Manager and search for:

    disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open

    remove: exec > save > restart PHP-FPM service (I recommend restart Apache service too) and check again for your error.

    Take care with "exec" function enabled(do you trust your users?).
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    "exec" is added to the disable_functions PHP configuration option by default with PHP-FPM. The following thread is helpful if you'd like to change the default PHP-FPM configuration values:

    Enabling PHP-FPM forces disable_functions

    However, generally it's a good idea to leave the exec function disabled for increased security.

    Thank you.
     
  4. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    418
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you provide a specific example of what you'd like to do?

    Thank you.
     
  6. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    418
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I want enable "exec()" function.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Yes, the only way to modify the default PHP-FPM values for the account is by using the instructions on the linked thread.

    Thank you.
     
Loading...

Share This Page