Community Forums

Important Notice:

Two sections of this forum are available only to registered customers. In order to receive access to the Customer Forums and ResellerCentral Forums, you must first register on these forums or login to your existing forum account. If you are an existing HostNine customer, be sure to register using the email address on file for your billing profile.

Go Back   HostNine Community Forums > H9 Customer Forums > WHMCS

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2008, 03:44 AM
christopherdowns christopherdowns is offline
Permanently Banned
 
Join Date: Jan 2007
Location: Christchurch, New Zealand
Posts: 66
Send a message via MSN to christopherdowns Send a message via Yahoo to christopherdowns
Default Updated: WHMCS Server Status Page (With MySQL)

This is an update of the module created by DaveyC from the H9 Forums which can be found at
http:http://www.hostnine.com/hosting-foru...ge-script.html

The major updates to this scripts are the inclusion of:
  • All current nodes - 63 Linux and 3 Windows
  • The inclusion of two status icons Red cross and Green Tick
  • The other key update is that the main folder structure now follows the WHMCS default structure meaning that as soon as you update the required files and upload then extract to your WHMCS folder you will be set to go
The server status will work on both the Default and Portal themes

This module will be updated as new nodes are added / locations moved and will be published to the H9 Forums please subscribe to the forum topic so you are informed of updates
Attached Files
File Type: zip WHMCS-RC-Server-Status.zip (11.6 KB, 117 views)
Reply With Quote
  #2  
Old 12-11-2008, 03:45 AM
christopherdowns christopherdowns is offline
Permanently Banned
 
Join Date: Jan 2007
Location: Christchurch, New Zealand
Posts: 66
Send a message via MSN to christopherdowns Send a message via Yahoo to christopherdowns
Default Readme

************************Last updated 11th December 2008*************************
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// This is an update of the module created by DaveyC from the H9 Forums
// which can be found at http://www.hostnine.com/hosting-foru...ge-script.html
// the major updates to this scripts are the inclusion of all nodes and the inclusion of two status icons
// the other update is that the main folder structure now follows the WHMCS default structure meaning that as soon
// as you update the required files and upload then extract to your WHMCS folder you will be set to go!
// the server status will work on both the Default and Portal themes
// this module will be updated as new nodes are added / locations moved and will be published to the H9 Forums
// please subscribe to the forum topic so you are informed of updates
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-------------
KNOWN ISSUES
-------------
1. Unfortunatly the Inserter script currently isnt adding location nodes to the database - if you can fix this please let me know
------------
SQL statement.
------------
WARNING: Back up your WHMCS database before undertaking any actions. I cannot be held responsible for
incorrect use of this script.
---------------
CREATING THE TABLE
---------------
Using phpMyAdmin, go to your WHMCS database and run the following SQL Query.
Replace cPanelUsername_dbasename with your WHMCS database name.. it will usually be your cPanel username, followed by _whmcs.
So, if your cPanel username is dave. Your database would usually be liquidfa_whmcs
CREATE TABLE `cPanelUsername_dbasename`.`mod_servers` (
`id` BIGINT( 20 ) NOT NULL AUTO_INCREMENT ,
`server` TEXT NOT NULL ,
`location` TEXT NOT NULL ,
`url` TEXT NOT NULL ,
`ftp` TEXT NOT NULL ,
`smtp` TEXT NOT NULL ,
`http` TEXT NOT NULL ,
`pop` TEXT NOT NULL ,
`mysql` TEXT NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM
---------------
PREPEAR THE INSERTER
---------------
Open the Inserter.php file
Scroll to the bottom of the file to where you see the below databases and enter in the Database name and passwords
/// $dbh = mysql_connect("localhost","USERNAME_WHMCS","PASSWO RD"); //Enter your Database Name i.e liquidfa_whmcs and your password ///
/// $select = mysql_select_db("USERNAME_WHMCS",$dbh); //Enter your Database Name again i.e liquidfa_whmcs ///
Save the file
---------------
PREPEAR THE CRON
---------------
Open the Cron File which is located in ./cron/cron.php
At the top of the file where you see the below databases and enter in the Database name and passwords
/// $dbh = mysql_connect("localhost","cPanelUsername_dbasenam e","dbasepassword"); //Enter your Database Name i.e liquidfa_whmcs and your password ///
/// mysql_select_db("cPanelUsername_dbasename"); //Enter your Database Name again i.e liquidfa_whmcs ///
Save the file
---------------
UPLOAD THE FILES
---------------
Upload the entire zip file to your WHMCS directory
Extract the contents
This will create a folder called WHMCS-RC-Server-Status
Copy all files from WHMCS-RC-Server-Status into their respective WHMCS folders
---------------
INSERTING THE RECORDS
---------------
Once you've created the table successfully, use the inserter script. This may take a moment or two, so please be patient with it, and don't hit the refresh
button, otherwise you'll get multiple entries of the same value.
The inserter script is in this archive, called "inserter.php". All this does is populate the database with the node i nformation to save you doing it
manually!
The inserter script is in the root of your WHMCS Installation i.e http://yourdomain.com/whmcs/inserter.php
PLEASE NOTE: There is no output on the inserter script. It will just present a white page. That's normal.
---------------
UPLOADING THE TEMPLATE
---------------
If you use the Default or Portal themes then you dont need to worry about this
If you use a custom theme then:
You will need to upload the "serverstatus.tpl" to your relevant WHMCS template directory.
The file will need to be edited to display your relevant status images.
---------------
USING THE CRON SCRIPT
---------------
The cron will upload to your WHMCS/Cron folder
Setup a cron to run once and hour i.e
*/55 * * * * php -q /home2/cPanelUsername/public_html/WHMCSDIRECTORYNAME/cron/cron.php
---------------
ACCESSING THE MODULE
---------------
To access the module, in your WHMCS admin panel, go to "Utilities -> Addon Modules -> Server Status";
Here, you can add more nodes, remove nodes, edit nodes and perform a manual status update.
---------------
THAT'S ALL FOLKS!
---------------
Reply With Quote
  #3  
Old 12-29-2008, 04:37 AM
chkms chkms is offline
New Member
 
Join Date: Dec 2008
Posts: 1
Default problems with update/cron script - error message...!

hello,
we installed within our whmcs your server status script.
when we run the following link (manual node update) ....

http://www.XXX.net/billing/admin/add...us&mode=update

we become the following error message:

[Mon Dec 29 09:24:34 2008] [error] [client XXX] File does not exist: /home/hp24net/public_html/status

--> is that a problem because we are working with a sub directory?
--> do you have a solution for this?

thank you for your feedback soon.

Andreas
Reply With Quote
  #4  
Old 03-07-2009, 08:54 AM
kikicomn kikicomn is offline
New Member
 
Join Date: Mar 2009
Posts: 1
Default Excellent Script

Excellent work!

Note that node Locations cannot be added because inserter.php has the values wrong. it should be "Node1" while it is "Node 1" in the first part of the script. This applies to all nodes.
Reply With Quote
  #5  
Old 04-13-2009, 07:53 AM
ManBearWaffle ManBearWaffle is offline
Newbie
 
Join Date: Apr 2009
Posts: 8
Default

I made my own insert script that has all 73 nodes and shows the locations. However, I'm having a problem with the cron. It gets up to Node 13, then stops checking the rest of the servers. I figured I'd share my insert script in exchange for some help with the cron.

Code:
<?php
$servers = array(
'Node 1' => 'Illinois, US',
'Node 2' => 'Illinois, US',
'Node 3' => 'Iowa, US',
'Node 4' => 'Texas, US',
'Node 5' => 'Virginia, US',
'Node 6' => 'Berkshire, UK',
'Node 7' => 'Georgia, US',
'Node 8' => 'California, US',
'Node 9' => 'New York, US',
'Node 10' => 'Illinois, US',
'Node 11' => 'Florida, US',
'Node 12' => 'Singapore, ASIA',
'Node 13' => 'Berkshire, UK',
'Node 14' => 'Texas, US',
'Node 15' => 'New York, US',
'Node 16' => 'Berkshire, UK',
'Node 17' => 'California, US',
'Node 18' => 'Berkshire, UK',
'Node 19' => 'Texas, US',
'Node 20' => 'New York, US',
'Node 21' => 'Iowa, US',
'Node 22' => 'Illinois, US',
'Node 23' => 'Georgia, US',
'Node 24' => 'Singapore, ASIA',
'Node 25' => 'Florida, US',
'Node 26' => 'Berkshire, UK',
'Node 27' => 'Virginia, US',
'Node 28' => 'California, US',
'Node 29' => 'Texas, US',
'Node 30' => 'New York, US',
'Node 31' => 'California, US',
'Node 32' => 'Texas, US',
'Node 33' => 'Berkshire, UK',
'Node 34' => 'Illinois, US',
'Node 35' => 'Hong Kong',
'Node 36' => 'Berkshire, UK',
'Node 37' => 'Virginia, US',
'Node 38' => 'Texas, US',
'Node 39' => 'Florida, US',
'Node 40' => 'New York, US',
'Node 41' => 'Texas, US',
'Node 42' => 'Texas, US',
'Node 43' => 'Washington, US',
'Node 44' => 'California, US',
'Node 45' => 'Berkshire,UK',
'Node 46' => 'Illinois, US',
'Node 47' => 'New York, US',
'Node 48' => 'Texas, US',
'Node 49' => 'Illinois, US',
'Node 50' => 'Berkshire, UK',
'Node 51' => 'Singapore, Asia',
'Node 52' => 'Washington, US',
'Node 53' => 'New York, US',
'Node 54' => 'California, US',
'Node 55' => 'Berkshire, UK',
'Node 56' => 'Texas, US',
'Node 57' => 'California, US',
'Node 58' => 'Texas, US',
'Node 55' => 'Berkshire, UK',
'Node 56' => 'Texas, US',
'Node 57' => 'California, US',
'Node 58' => 'Texas, US',
'Node 59' => 'Berkshire, US',
'Node 60' => 'Washington D.C, US',
'Node 61' => 'California, US',
'Node 62' => 'New York, US',
'Node 63' => 'Berkshire, UK',
'Node 64' => 'Georgia, US',
'Node 65' => 'Texas, US',
'Node 66' => 'California, US',
'Node 67' => 'Texas, US',
'Node 68' => 'Berkshire, UK',
'Node 69' => 'Texas, US',
'Node 70' => 'California, US',
'Node 71' => 'Georgia, US',
'Node 72' => 'California, US',
'Node 73' => 'Texas, US',
'Win 1' => 'Texas, US',
'Win 2' => 'Texas, US',
'Win 3' => 'Texas, US',


);

$servershost = array(
'Node 1' => 'node1.myserverhosts.com',
'Node 2' => 'node2.myserverhosts.com',
'Node 3' => 'node3.myserverhosts.com',
'Node 4' => 'node4.myserverhosts.com',
'Node 5' => 'node5.myserverhosts.com',
'Node 6' => 'node6.myserverhosts.com',
'Node 7' => 'node7.myserverhosts.com',
'Node 8' => 'node8.myserverhosts.com',
'Node 9' => 'node9.myserverhosts.com',
'Node 10' => 'node10.myserverhosts.com',
'Node 11' => 'node11.myserverhosts.com',
'Node 12' => 'node12.myserverhosts.com',
'Node 13' => 'node13.myserverhosts.com',
'Node 14' => 'node14.myserverhosts.com',
'Node 15' => 'node15.myserverhosts.com',
'Node 16' => 'node16.myserverhosts.com',
'Node 17' => 'node17.myserverhosts.com',
'Node 18' => 'node18.myserverhosts.com',
'Node 19' => 'node19.myserverhosts.com',
'Node 20' => 'node20.myserverhosts.com',
'Node 21' => 'node21.myserverhosts.com',
'Node 22' => 'node22.myserverhosts.com',
'Node 23' => 'node23.myserverhosts.com',
'Node 24' => 'node24.myserverhosts.com',
'Node 25' => 'node25.myserverhosts.com',
'Node 26' => 'node26.myserverhosts.com',
'Node 27' => 'node27.myserverhosts.com',
'Node 28' => 'node28.myserverhosts.com',
'Node 29' => 'node29.myserverhosts.com',
'Node 30' => 'node30.myserverhosts.com',
'Node 31' => 'node31.myserverhosts.com',
'Node 32' => 'node32.myserverhosts.com',
'Node 33' => 'node33.myserverhosts.com',
'Node 34' => 'node34.myserverhosts.com',
'Node 35' => 'node35.myserverhosts.com',
'Node 36' => 'node36.myserverhosts.com',
'Node 37' => 'node37.myserverhosts.com',
'Node 38' => 'node38.myserverhosts.com',
'Node 39' => 'node39.myserverhosts.com',
'Node 40' => 'node40.myserverhosts.com',
'Node 41' => 'node41.myserverhosts.com',
'Node 42' => 'node42.myserverhosts.com',
'Node 43' => 'node43.myserverhosts.com',
'Node 44' => 'node44.myserverhosts.com',
'Node 45' => 'node45.myserverhosts.com',
'Node 46' => 'node46.myserverhosts.com',
'Node 47' => 'node47.myserverhosts.com',
'Node 48' => 'node48.myserverhosts.com',
'Node 49' => 'node49.myserverhosts.com',
'Node 50' => 'node50.myserverhosts.com',
'Node 51' => 'node51.myserverhosts.com',
'Node 52' => 'node52.myserverhosts.com',
'Node 53' => 'node53.myserverhosts.com',
'Node 54' => 'node54.myserverhosts.com',
'Node 55' => 'node55.myserverhosts.com',
'Node 56' => 'node56.myserverhosts.com',
'Node 57' => 'node57.myserverhosts.com',
'Node 58' => 'node58.myserverhosts.com',
'Node 59' => 'node59.myserverhosts.com',
'Node 60' => 'node60.myserverhosts.com',
'Node 61' => 'node61.myserverhosts.com',
'Node 62' => 'node62.myserverhosts.com',
'Node 63' => 'node63.myserverhosts.com',
'Node 64' => 'node64.myserverhosts.com',
'Node 65' => 'node65.myserverhosts.com',
'Node 66' => 'node66.myserverhosts.com',
'Node 67' => 'node67.myserverhosts.com',
'Node 68' => 'node68.myserverhosts.com',
'Node 69' => 'node69.myserverhosts.com',
'Node 70' => 'node70.myserverhosts.com',
'Node 71' => 'node71.myserverhosts.com',
'Node 72' => 'node72.myserverhosts.com',
'Node 73' => 'node73.myserverhosts.com',
'Win 1' => 'win1.myserverhosts.com',
'Win 2' => 'win2.myserverhosts.com',
'Win 3' => 'win3.myserverhosts.com',
);

print_r($servershost);

$dbh = mysql_connect("localhost","username","passowrd");
$select = mysql_select_db("database",$dbh);
foreach($servershost as $svrName  => $host)
{
	$sql = "INSERT INTO `mod_servers` (`id`,`server`,`location`,`url`) VALUES (NULL, '$svrName','$servers[$svrName]','$host');";
	$result = mysql_query($sql) or die(mysql_error());
	
}
?>
Reply With Quote
  #6  
Old 07-31-2009, 03:52 PM
mustafacan46 mustafacan46 is offline
New Member
 
Join Date: Jul 2009
Posts: 1
Default

hi

i want, the customers can see uptime / mysql and php versiyon / etc.

how do ?

thanks from turkey
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WHMCS Server Status Page Script. DaveyC WHMCS 109 02-08-2010 04:01 AM
WHMCS Server Status Integration Olipro WHMCS 7 11-27-2009 07:03 AM
Server Status in Admin of WHMCS rabble WHMCS 1 03-21-2008 05:34 PM
Node Status Page christopherdowns WHMCS 5 01-08-2008 09:14 PM
Server Status Page Express Feedback & Suggestions 3 06-04-2007 04:43 PM


All times are GMT -5. The time now is 12:12 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

Host Nine

Our mission began in 2006. Thousands of awesome clients later, we are now one of the most popular hosters in the world.
Most of this is because of our fantastic support. Join us, you'll be glad you did - that's a given.