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.

Cannot enable exec()

Discussion in 'General Discussion' started by SpaceCowboy, Oct 26, 2016.

Tags:
  1. SpaceCowboy

    SpaceCowboy Well-Known Member

    Joined:
    Jan 18, 2014
    Messages:
    54
    Likes Received:
    4
    Trophy Points:
    8
    cPanel Access Level:
    Website Owner
    Can someone lend me a hand with this?
    I'm trying to enable php function exec()
    It is not disabled by php.ini

    So why doesn't it work? What else can i try? it's CentOS btw.

    Thanks.
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    542
    Likes Received:
    39
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Please make sure which php.ini file is using your account. For that you can create phpinfo file and check the your account php.ini configuration file path.
     
  3. SpaceCowboy

    SpaceCowboy Well-Known Member

    Joined:
    Jan 18, 2014
    Messages:
    54
    Likes Received:
    4
    Trophy Points:
    8
    cPanel Access Level:
    Website Owner
    Hi ok i did, it says:
    Code:
    Loaded Configuration File    /opt/cpanel/ea-php56/root/etc/php.ini
    The line disabled functions is empty:
    Code:
    disable_functions =
    But the PHP info page says:
    Code:
    disable_functions    exec,passthru,shell_exec,system
    Where is it getting it from? Not from php.ini so where is it?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify if you used "WHM Home >> Software >> MultiPHP INI Editor" to make the change to the 'disable_functions' line? If not, could you browse to Editor Mode on this option and save the changes?

    Note that on systems that run EasyApache 4, multiple php.ini and local.ini files manage your system's PHP. Each version of PHP on your systems uses its own php.ini and local.ini file. You must make changes to each file separately. Please also see this document:

    The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation

    Thank you.
     
  5. tomdchi

    tomdchi Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    123
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Atlanta, GA
    cPanel Access Level:
    DataCenter Provider

    I know this thread is a little old but if you are using PHP-FPM there is another php.ini. See thread here: exec() disabled when PHP-FPM enabled
     
Loading...

Share This Page