Jump to content

Service uptime and load not working


Terrabit Host

Recommended Posts

Hi,

 

i recently moved over to a new dedicated server and re-installed whmcs only this time to find that the status script doesnt show the uptime just 0 Days 00:00:00 and just says not available for server load, any ideas why it would be doing this?

 

Any help would be appreciated.

 

it can been seen here:

 

http://billing.terrabithost.com/serverstatus.php

 

and here:

 

http://status.terrabithost.com

 

Thanks

Link to comment
Share on other sites

Hi,

 

i recently moved over to a new dedicated server and re-installed whmcs only this time to find that the status script doesnt show the uptime just 0 Days 00:00:00 and just says not available for server load, any ideas why it would be doing this?

 

Any help would be appreciated.

 

it can been seen here:

 

http://billing.terrabithost.com/serverstatus.php

 

and here:

 

http://status.terrabithost.com

 

Thanks

 

I saw the same thing recently on one of my servers. Take a look at the http error logs on the system you are trying to get the uptime from. I saw an error in mine that looked like:

 

sh: line 1: /uptime: No such file or directory

 

I haven't figured out the best way to deal with this, but essentially something is preventing php from using the full path to the uptime command. I think it might be related to safe_mode being on, but I haven't had enough time to investigate.

 

-Eric

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

If your php has been secured by disabling some functions then the status script won't work. Check your php.ini and see what functions are disabled.

 

look for disable_functions =

 

The script doesn't work on any of my servers because of this but I would rather keep the functions disabled and not use the status page. I prefer to allow customers to do a realtime check on their domain name with something like this.

 

<? error_reporting(0);

 

if ( $domain !="" ) {

 

function lookup_ports($hport,$who)

 

{

 

$fp=fsockopen($who, $hport,$errno,$errstr, 4);

 

if (!$fp){

 

$data="<font color=red>".Failed."</font>";

 

} else {

 

$data="<font color=green>".OK."</font>";

 

fclose($fp);

 

}

 

return $data;

 

}

 

echo "<li><b>Results for $domain on the: ";

 

echo date("dS F Y");

 

echo "<P><BR></P>";

 

echo "<li><b>HTTP Web Server:</b> <i>Current Status=<b>".lookup_ports("80",$domain)."</b></i></li>\n";

 

echo "<P><BR

 

</P>";

 

echo "<li><b>FTP Server:</b> <i>Current Status=<b>".lookup_ports("21",$domain)."</b></i></li>";

 

echo "<P><BR

 

</P>";

 

echo "<li><b>SMTP - Outgoing Mail Server:</b> <i>Current Status=<b>".lookup_ports("26",$domain)."</b></i></li>";

 

echo "<P><BR

 

</P>";

 

echo "<li><b>POP3 - Incoming mail Server:</b> <i>Current Status=<b>".lookup_ports("110",$domain)."</b></i></li>";

 

echo "<P><BR

 

</P>";

 

;}

?>

 

Include that in a form and pass the domain using submit

Edited by simplybe
Link to comment
Share on other sites

  • 3 weeks later...
  • 5 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated