Jump to content

Services Incorrect on Server Status


mikelegg

Recommended Posts

I have no problem getting the services to display accurately on my dedicated servers but I can't get the http/ftp/pop3 status indicators to work on a reseller account.

 

The indicators always show the services as down, when they are actually alive and well.

 

1) It's not a firewall problem on the remote server. I've contacted the provider of the reseller account and their not blocking my IP. And I assume that if the ports in question were blocked no one on the server would have any http,ftp or pop3 services.

 

2) It's not the firewall on my server because I can successfully monitor other servers from this machine.

 

3) I Don't think it's a PHP restriction on the remote server because the server uptime and load are displaying perfectly.

 

I seached the WHMCS code for the get_port_status function but my search returned no results so I'm a bit mystified as to how this code actually works which makes it hard to debug.

 

Does anybody have any suggestions as to what I should check next?

Edited by mikelegg
spelling
Link to comment
Share on other sites

If you want something done, do it yourself.

 

I've rewritten serverstatus.tpl to use PHP's fsockopen for my reseller server and the mysterious "get_port_status" for the others.

 

It's ugly but it works, here's the code for the HTTP port:

 

<td>

{if $server.name == 'MyResellerServername'}

{php}

$fp = fsockopen('resellerserver.hostname',$errno,$errstr,80,10);

if($fp){

echo('<img src="images/statusok.gif" width="15" height="15" border="0" />');

}else{

echo('<img src="images/statusfailed.gif" width="15" height="15" border="0" />');

}

{/php}

{else}

{get_port_status num="$num" port="80"}

{/if}

</td>

Edited by mikelegg
Link to comment
Share on other sites

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