Server Check

Basti

Administrator
Staff member
Why autofill? Like on join when you dont submit a port, internally it use the default port. But you want then on edit form to show that port insteaad of being blank?
 

djniio

New Member
hello i try to run a cron job for the server check and a take this...
any help?
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/mysitename/public_html/topsites/sources/sql/mysql.php on line 32
Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/mysitename/public_html/topsites/sources/sql/mysql.php on line 33
Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in /home/mysitename/public_html/topsites/sources/sql/mysql.php on line 34
Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/mysitename/public_html/topsites/sources/sql/mysql.php on line 48
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/mysitename/public_html/topsites/sources/sql/mysql.php on line 48
Fatal error: Database error in "/home/mysitename/public_html/topsites/plugins/ServerCheck/cron.php" on line 48
in /home/mysitename/public_html/topsites/sources/sql/mysql.php on line 89
 

Basti

Administrator
Staff member
Wonder if its a database access rights problem of some sort.

Could you try accessing the file via a webbrowser? yoursite.com/topsites/plugins/ServerCheck/cron.php
Do you get the same error messages?
 

Basti

Administrator
Staff member
Then i suppose cron have some issues with the require once in the file, looks like cron, on your server, uses a different working dir than the one when accessed through a webbrowser.
Maybe its server setting, dont know exactly, again not so server techy.

Could you open up /topsites/plugins/ServerCheck/cron.php and find this line
Code:
$CONF['path'] = '../..';
Please change it to
Code:
$CONF['path'] = realpath( dirname(__FILE__).'/../..');
Maybe this will help
 

djniio

New Member
nop the same....
i change in the settings_sql.php $CONF['sql_host'] = 'localhost'; to $CONF['sql_host'] = '127.0.0.1'; and the error gone... but the status on the ranking site still show offline
 

Basti

Administrator
Staff member
Ah then you cant use localhost yea, think that is a server config option, but dont ask me where.

As for the status, it can have different reasons, i suppose you followed the instructions. Then it depends if you correctly entered ur ip / query port during join and if you correctly set up the admin part.
 

pratchet

Member
Greetings!
Is there a way, this plugin can be simplified?
I think it is enough to check only the ip and port for online status.
something like this
I guess it would be good also keeps statistics on the time online/offline

Best Regards and good luck!
 

daannet

Member
This is a game server checker... Not a server online status script... This script gets the status, players and if you do some effort you can much more.
 

Basti

Administrator
Staff member
No -.- sorry to disappoint you, that will never happen. each and every game uses different mechanism for queries, so you urself, unless you know what to do in the php, can never add games yourself
 

Basti

Administrator
Staff member
iam totally not sure what you want buddy. just online offline status? check the first post, just place the online/offline template tags then
 

Basti

Administrator
Staff member
You clearly not followed install steps or so?
If you read it again, you see that there are admin settings. And there is exactly where you see the currently supported games
 
Top