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.

shell_exec() has been disabled for security reasons in /usr/local/cpanel/whostmgr/.../logger.php

Discussion in 'General Discussion' started by postcd, Sep 20, 2015.

  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    Hello, in root folder on WHM server i have "error_log" file which contains many log lines from today and many days before:
    PHP Warning: shell_exec() has been disabled for security reasons in /usr/local/cpanel/whostmgr/docroot/themes/x/xtra/functions/load/logger.php on line 76

    Is it problem that WHM cant use this PHP function? How should i solve this while keeping this function disabled for hosted websites?

    thank you
     
  2. madmanmachines

    madmanmachines Well-Known Member

    Joined:
    Nov 28, 2014
    Messages:
    94
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    This looks like you are using a 3rd-party addon for WHM that has special requirements that cPanel/WHM does not normally allow. I'd say that 'shell_exec()' is disabled for good reason. You must absolutely trust this addon if you enable 'shell_exec()'. Search for the directive using the following
    Code:
    find /usr/local/ -type f -name php.ini -exec grep -il "shell_exec" {} \; 
    I doubt the same PHP configuration is used for this 3rd-party addon and the actual websites.
     
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    Thx, yes, your command found file: /usr/local/lib/php.ini

    And the above mentioned log entry points to this file: /usr/local/cpanel/whostmgr/docroot/themes/x/xtra/functions/load/logger.php

    which contains:
    To disable this script/WHMXtra plugin,
    go to Plugins >> Load/Bandwidth Monitor and select the option to
    disable the cron
     
    #3 postcd, Sep 20, 2015
    Last edited: Sep 20, 2015
  4. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    Can i somehow edit that logger.php file and disallow it to log errors?

    or into that directory .htaccess to add something like?:
    ErrorLog /dev/null
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    I suggest reporting this issue to the developer of the plugin you are using. It's possible an update is available for it, or the developers need to address the issue to avoid a modification to the cPanel PHP configuration.

    Thank you.
     
  6. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    Thanks, the developer is aware and will probably use different function in future.

    To disable this script/WHMXtra plugin, go to Plugins >> Load/Bandwidth Monitor
    and select the option to disable the cron

    solved 4me, thx Michael
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I m happy to see you were able to address the issue by disabling the plugin and contacting the developer. Thank you for updating us with the outcome.
     
Loading...

Share This Page