You are here:Home»KB»Web Design»CMS»WHMCS»Server load, uptime and phpinfo always say Unavailable or 00:00:00
Saturday, 05 March 2016 11:38

Server load, uptime and phpinfo always say Unavailable or 00:00:00

Written by

On most servers, especially shared servers the WHMCS Server Status will most likely not work because certain PHP functions are disabled for security reasons. In order for these values to be obtained, the file status/index.php that you upload to every server has to be able to execute these PHP functions:

  • exec - shows Load
  • shell_exec - shows Uptime

To enable them, you can do one of the following options to enable the functions

  • edit the servers global php.ini
    • Search down for the line that says disabled_functions and then remove exec and shell_exec from the list of functions following that.
    • This does enable these function for the whole server so is not recommended
  • use SetEnv PHPRC /home/example1/public_html/status/php.ini
    • create a custom php.ini by copying the serer php.ini
    • Search down for the line that says disabled_functions and then remove exec and shell_exec from the list of functions following that.
    • This will allow these functions to run only in this directory
  • you could possibly us suPHP command to allow the use of these commands

There is a possiblity a htaccess password protection stop s the script working

Read 1000 times Last modified on Sunday, 06 March 2016 13:56