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!

disable_functions not working

Discussion in 'EasyApache' started by DennisMidjord, Sep 1, 2017.

Tags:
  1. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    163
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    Hi,

    I've tried using disable_functions by editing the php.ini files through WHM > Software > MultiPHP INI Editor, but these changes doesn't take affect, it seems.
    i.imgur.com/DjD2lOI.png

    I've defined the disabled functions as such:
    disable_functions = show_source,system,shell_exec,passthru,exec,phpinfo,popen,proc_open

    I've restarted Apache and Litespeed and tried to update the CageFS skeleton, but it seems like it just won't work. It also doesn't help changing the values for the user only.
     
    #1 DennisMidjord, Sep 1, 2017
    Last edited by a moderator: Sep 1, 2017
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    163
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    Hi,

    We're not using PHP Selector, which is why I made the changes to MultiPHP instead. No changes made in WHM > Software > MultiPHP INI Editor are taking affect. I've also made sure that it's the right file that is loaded and that this file contains the changed values.
     
  4. Anoop P Alias

    Anoop P Alias Well-Known Member

    Joined:
    Mar 31, 2015
    Messages:
    94
    Likes Received:
    14
    Trophy Points:
    8
    Location:
    Kochi,Kerala,India
    cPanel Access Level:
    Root Administrator
    The MultiPHP system is the EA4 SCL ones in /opt/cpanel . You say you have restarted litespeed
    please put a phpinfo(); function in the web root and call it via browser .See what SAPI it is using . For the php-fpm one disabled_functions is specified in the php-fpm pool file by cPanel which overrides php.ini PHP-FPM and EasyApache 4 - Documentation - cPanel Documentation
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    163
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    What do you mean what SAPI it's using? I've already called the phpinfo(); function.
    I can see that the webserver is indeed loading /opt/cpanel/ea-php56/root/etc/php.ini which contains the changed values, but none of the values are changed when looking at phpinfo.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Could you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. CFelix

    CFelix Member

    Joined:
    Nov 3, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Africa
    cPanel Access Level:
    Website Owner

    Hello,
    Please am having the same problem, i am on vps and I have setup the multiple INI editor and included shell_exec in disable_functions list but to my surprise I tried shell_exec func in website and it works.

    What could be the cause and how will I remedy it?

    Thank you.
     
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Can you verify which specific PHP handler you have enabled for the domain names you notice this on? For instance, are you using PHP-FPM?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. CFelix

    CFelix Member

    Joined:
    Nov 3, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Africa
    cPanel Access Level:
    Website Owner
    You know it once stopped and after a while , when i set my php to only php7.0 version but started showing again. I mean phpinfo, there was a time I tried it and it does not show. But after some time it starts showing again.

    My php handler is suphp and and i have PHP-FPM to be on.
     
  10. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    There are some additional steps you must take when adjusting the disable_functions value for an account when using PHP-FPM. We provide instructions on how to modify the disable_functions PHP setting with PHP-FPM at:

    Enabling PHP-FPM forces disable_functions

    Thank you.
     
    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