C Powell Posted May 22, 2009 Share Posted May 22, 2009 Hi, Under Server Status - Server Load it shows as Unavailable yet HTTP, FTP, POP3, PHP Info and Uptime all show fine. I uploaded the status folder from the WHMCS download to the server at for example /public_html/my_directory/ so the actual path to the file is /public_html/my_directory/hosting/status/index.php i then put the URL in server configuration in WHMCS panel like http://hosting.domain.tld/status/'>http://hosting.domain.tld/status/ I have WHMCS installed in subdomain like http://hosting.domain.tld How to get the Server Load to display? I hope it isn't a problem with server 0 Quote Link to comment Share on other sites More sharing options...
hightekhosting Posted May 22, 2009 Share Posted May 22, 2009 Hello, This would be due to a configuration of your server (your php.ini file) not allowing you to query the server load using the PHP script. If you have root access to the server, you will need to edit the following line in your php.ini file: disable_functions = and remove the command that says exec If you don't have root access, contact your host about removing the entry (if they will) Cheers, Dale 0 Quote Link to comment Share on other sites More sharing options...
C Powell Posted May 22, 2009 Author Share Posted May 22, 2009 Hi In WebHost Manager @ Main >> Service Configuration >> PHP Configuration Editor I have Safe Mode disable_functions "This directive allows you to disable certain functions for security reasons. It takes on a comma-delimited list of function names. disable_functions is not affected by Safe Mode." but the textarea is jut blank. Shall i just ask host or can i sort ? Thanks for help 0 Quote Link to comment Share on other sites More sharing options...
hightekhosting Posted May 22, 2009 Share Posted May 22, 2009 Login to the server via SSH if you can and check the /usr/local/lib/php.ini I've seen issues with WHM not reporting the actual settings once before, so if you can check that file, it will eliminate something atleast. 0 Quote Link to comment Share on other sites More sharing options...
C Powell Posted May 22, 2009 Author Share Posted May 22, 2009 I can access putty but what command do i need to run to check i tried /usr/local/lib/php.ini but just got -bash: /usr/local/lib/php.ini: Permission denied Im newbie heh 0 Quote Link to comment Share on other sites More sharing options...
hightekhosting Posted May 22, 2009 Share Posted May 22, 2009 Try: pico /usr/local/lib/php.ini or nano /usr/local/lib/php.ini Pico and nano are the easiest...I won't get you using VI as it is a little more complex. If you can get into pico or nano, then press Ctrl+w for search, type "disable_functions" without the quotes and press enter. Check the line and advise Dale 0 Quote Link to comment Share on other sites More sharing options...
C Powell Posted May 22, 2009 Author Share Posted May 22, 2009 Cool. will have to read up on pico and nano. I tried pico /usr/local/lib/php.ini but got the same ; This directive allows you to disable certain functions for security reasons. ; It receives a comma-delimited list of function names. This directive is ; *NOT* affected by whether Safe Mode is turned On or Off. disable_functions = Neeexxxt 0 Quote Link to comment Share on other sites More sharing options...
[JSH]John Posted May 23, 2009 Share Posted May 23, 2009 For your service status URL, check that you've added a slash to the end of it. If you've put 'http://domain.com/status' it would show unavailable. If you put 'http://domain.com/status/' then it will show the uptime and server load. 0 Quote Link to comment Share on other sites More sharing options...
C Powell Posted May 23, 2009 Author Share Posted May 23, 2009 This is what's strange. It shows the Uptime fine just not the Server Load. I have it like http://hosting.domain.com/status/ I even uploaded status folder to directory like http://www.domain.com/status/ to see if it needed to come off the main folder but it made no difference. I can't believe i have full dedicated server and can't even get it to work right . Well i did get it to work with the first trial i used under a different subdomain. It isn't having any of it this time round though. I'd really like to get this working. WHMCS seems to be the best client billing management system for cPanel/WHM so would like to get it to work properly on my server setup. When little things like just showing the Uptime doesn't work it puts me off using the script 0 Quote Link to comment Share on other sites More sharing options...
striddy Posted May 23, 2009 Share Posted May 23, 2009 It shows the Uptime fine just not the Server Load. Try this code in a new php file. <?php exec("uptime", $MyResults); print_r($MyResults); ?> What results do you get? 0 Quote Link to comment Share on other sites More sharing options...
jlk Posted May 23, 2009 Share Posted May 23, 2009 I'm having a similar issue. I have two servers, one runs Plesk and the other cPanel. The cPanel info is all there. The Plesk server shows uptime as "0 Days 00:00:00" and server load as "unavailable". Php Info is working on both. [root@server ~]# cat /etc/php.ini | grep disable_functions disable_functions = Output from <?php exec("uptime", $MyResults); print_r($MyResults); ?> when called in a browser or from the command line is: Array ( ) Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
striddy Posted May 25, 2009 Share Posted May 25, 2009 So "uptime" doesn't work. Try this to see if "exec" works. <?php print "Testing exec() function : <br>"; exec('ps aux',$MyResults); foreach($MyResults as $line){ print $line . '<br>'; } print "Done <br>"; ?> 0 Quote Link to comment Share on other sites More sharing options...
jlk Posted May 25, 2009 Share Posted May 25, 2009 No luck either. Output is: Testing exec() function :Done Hmmm.... 0 Quote Link to comment Share on other sites More sharing options...
striddy Posted May 25, 2009 Share Posted May 25, 2009 No luck either. So "exec" doesn't work. Contact your host with that info. 0 Quote Link to comment Share on other sites More sharing options...
C Powell Posted May 25, 2009 Author Share Posted May 25, 2009 DedicatedNOW have sorted this for me when i asked how they did it i got "I could see that the code that was used to check uptime was edited and was replaced by one which uses another function "system" instead. Please let us know if you need any further assistance regarding this." 0 Quote Link to comment Share on other sites More sharing options...
jlk Posted May 25, 2009 Share Posted May 25, 2009 So "exec" doesn't work. Contact your host with that info. It's a Plesk VPS on a Virtuozzo node that I own, so unfortunately there is no host to ask. Maybe it's a Plesk issue? 0 Quote Link to comment Share on other sites More sharing options...
supernix Posted May 28, 2009 Share Posted May 28, 2009 I keep getting a odd error where the status for one server keeps swapping for that of another server. Funny thing is when I click phpinfo it shows up fine the info is that of the server it should be. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.