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!

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:
    689
    Likes Received:
    14
    Trophy Points:
    68
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. madmanmachines

    madmanmachines Well-Known Member

    Joined:
    Nov 28, 2014
    Messages:
    94
    Likes Received:
    4
    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:
    689
    Likes Received:
    14
    Trophy Points:
    68
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #3 postcd, Sep 20, 2015
    Last edited: Sep 20, 2015
  4. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    689
    Likes Received:
    14
    Trophy Points:
    68
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,943
    Likes Received:
    1,821
    Trophy Points:
    363
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    689
    Likes Received:
    14
    Trophy Points:
    68
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,943
    Likes Received:
    1,821
    Trophy Points:
    363
    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.
     
    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