Raised This Month: $32 Target: $400
 8% 

[TF2 Stats] With Web Ranking and Item Logger [v9.1.0]


Post New Thread Reply   
 
Thread Tools Display Modes
SCE_Ghost
Member
Join Date: Feb 2009
Old 12-01-2009 , 12:08   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #31

Thank you for the reply

Here is what I'm seeing missing and causing all the confusion.

1.The database.cfg - use the settings shown if adding to the same server as TF2 is running on, other wise you will need to add your web sql info if hosted elsewhere. i.ee I host at hostmonster.com. you will also need to add i.e. gameservers ip your remote sql list (found in cpanel)
*Please correct me if I am miss informed.

2. The web interface/inc/settings.php - I assume since I am hosting with hostmonster I add my sql db info in there as well - so same info for both database.cfg and settings.php?

3. tf2-stats.cfg - besides changing the points there is a setting for enabling webinterface:
// :: Webrank Configuration
rank_webrank "0"
rank_webrankurl ""

*does this get edited as well??

Also I noticed that the .smx does not show in my loaded plugins listing -
sm plugins list (yes I stopped and restarted the server)

Any help would be grateful.
SCE_Ghost is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 12-01-2009 , 14:22   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #32

Ignore tf2-stats.cfg.

Here is an example of a correct config using mysql:
"tf2stats"
{
"driver" "mysql"
"host" "123.456.789" -your webserver's ip
"database" "_tf2stats" -your db name
"user" "_stats" -your username
"pass" "11122fgt" -above user's password
//"timeout" "0" -ignore
"port" "3306" -also ignore
}

You would use the same settings for the settings.php file, except you would use localhost rather then the server IP. (Assuming you have the database and the website on the same server).

If the plugin is not running you have to fix that first.
Refresh your server's plugins, if it's not loaded, check for errors.
If it says something like "IP1 is denied access to database on IP2" then you need to unblock "IP1" and allow it to edit the database.

If you refresh the plugins and there are no errors and the plugin still isnt loaded, then you probably installed it wrong.
__________________
DarthNinja is offline
SCE_Ghost
Member
Join Date: Feb 2009
Old 12-01-2009 , 17:17   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #33

Ok I have it setup as you stated. I'm still not getting the pluggin loaded so I'm guessing thats more the issue. However the when you say error I assume you looking in the tf2 logs?

Also with cpanel remote sql option you cannot add a port # only the ip could that be causing any issues?

Also can you install the .smx file wrong lol? I just placed it were it said to go addons/sm/plugins/....

here is my site link
Code:
http://www.shadowcompanyelite.com/tf/tf2stats/
Also just got this on the gameserver error logs
Failed to connect: [2003]: Can't connect to MySQL server on '74.220.*.*' (110)- (I edited the ip on here only)
L 12/01/2009 - 14:184: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 12/01/2009 - 14:184: [SM] Displaying call stack trace for plugin "n1g-tf2-stats.smx":
L 12/01/2009 - 14:184: [SM] [0] Line 2797, G:\Users\Raphael\Desktop\Neuer Ordner (4)\TF2-Stats-V5.0\plugin\tf\addons\sourcemod\scripting\n1g-tf2-stats.sp::createdbtables()
L 12/01/2009 - 14:184: [SM] [1] Line 179, G:\Users\Raphael\Desktop\Neuer Ordner (4)\TF2-Stats-V5.0\plugin\tf\addons\sourcemod\scripting\n1g-tf2-stats.sp::OnPluginStart()

Last edited by SCE_Ghost; 12-01-2009 at 17:32.
SCE_Ghost is offline
MjrNuT
SourceMod Donor
Join Date: Feb 2008
Location: Under the Beaming CA Sun
Old 12-01-2009 , 18:25   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #34

Ghost and DarthNinja,

Going to try and help here after I've read what is going on. I may have some redundant steps, but I hope it is just step-by-step for you to follow.

Main thing is whether Hostmonster allows outside conncections to the mysql. afaik, the gameserver is wide open b/c anyone can join it to play.

So here goes...

Let me see if I can lend some assistance here.


You are hosted on hostmonster.com, so assuming they allow an IP to access your mysql, these would be your basic steps from Cpanel


1. Create a new mysql database -- ghoststats

2. Create a user for the database -- username: ghostuser password: pass

3. Add ghostuser access to ghoststats database, grant ALL privs

4. Click on phpmyadmin to confirm the mysql exists

5. Click on Remote Mysql icon from Cpanel -- enter the IP address of your game server. You might have to enter "%"


Website setup, using your link = .../tfstats/

1. You would have uploaded the all the contents of the zip file (TF2 Ranking Web Interface v6.5.1.zip) to /tfstats/ folder.

2. Only file to edit is /tf2stats/inc/setting.php

Using the same info I provided above

Code:
$mysql_server = "localhost";
$mysql_user = "ghostuser";
$mysql_password = "pass";
$mysql_database = "ghoststats";
Note, you might be using Localhost, but check and see when you go to phpmyadmin. Or the server name will be the same one that you use for your website.


On the gameserver, assuming you have SM installed correctly and working:

1. All you need is the *.smx file be placed in
Code:
..addons/sourcemod/plugins/n1g-tf2-stats.smx
2. All you need is the .cfg file be placed in

Code:
..tf/cfg/tf2-stats.cfg
You can edit that file later


Editing the databases.cfg file located in

Code:
/addons/sourcemod/configs/databases.cfg
per DarthNinja, but I'm using again my example inputs

Code:
"tf2stats"
{
"driver" "mysql"
"host" "123.456.789" -your webserver's ip
"database" "ghoststats" -your db name
"user" "ghostuser" -your username
"pass" "pass" -above user's password
//"timeout" "0" -ignore
"port" "3306" -also ignore
}
It might be possible that you have a different port number. Again, if your website is on hostmonster, then check the configs for that regarding the mysql as I would suspect you'd be using the same host and port number settings for the stats.


Log files are located

Code:
addons/sourcemod/logs
YOu want to look for error_*.log files and others. I'd suggest you look there now with FTP and delete any existing.

Then do a full stop on the game server, then a Start. Sometimes a restart doesn't trigger things.
__________________
Flames and Ash Gaming
Addon: SM v1.4.0-dev MM 1.8.5-dev
Plugins: Advertisements, Webshortcuts, spray tracer, SBans, RTD, gScramble Balance, misc
MjrNuT is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 12-01-2009 , 19:09   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #35

Remember that when unblocking the game server's IP, the IP you need to unblock may not be the same as the one you connect to.
eg:
My server IP is 216.6.235.204
However the IP I have to unblock is 216.6.235.2

If you have that problem, the db server should return "access denied for IP blah blah blah".
The 'denied' IP is the one you need to unblock.

Right now your problem is that the game server cant connect to the web server, reading the setup instructions again, or what MjrNuT posted above would be a good place to start.
__________________
DarthNinja is offline
SCE_Ghost
Member
Join Date: Feb 2009
Old 12-01-2009 , 22:26   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #36

well all my settings match watch should be correct.

Quote:
5. Click on Remote Mysql icon from Cpanel -- enter the IP address of your game server. You might have to enter "%"
This I tried and tried I cannot add a % =wildcard i.e. 8.23.237.% but it says invalid format

So this leaves me with 2 issues.

1. my remote sql connect thru cpanel(hostmonster) isnt unlocking the ip for gameservers. Im wondering since gameservers assigns a :port# if that will mess with things since the remote sql can only add an ip address without port

2. the smx isnt loading as a plugin, I assume it would be called n1g-stats something on my running plugin list, the only other reason I can think of is due to not being able to connect to the db before loading.

* I was reading with hostmonster and other hosting companies they are on a shared ip address, it still should be considered static but another thought..

Thanks for all the help so far

Last edited by SCE_Ghost; 12-01-2009 at 22:28.
SCE_Ghost is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 12-01-2009 , 22:38   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #37

If the plugin is loaded it will show up using "sm plugins list" as ""TF2 Stats" (5.0) by R-Hehl".
If it is not loaded, you should see a startup error at the bottom of the list, and hopefully a reason for the error, such as 'access denied'.

You can try using * as a wildcard also, but the plugin should tell you the response from the mysql server which would have the IP the game server is using.

If you still can't get it unblocked I would recommend talking with your hosting company's tech support...
__________________
DarthNinja is offline
SCE_Ghost
Member
Join Date: Feb 2009
Old 12-01-2009 , 22:39   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #38

OK for furture questions remote sql to get the % must be added as a sub c so i.e. 8.23.237.0/24 will give you 8.23.237.% which will cover the ip range.
SCE_Ghost is offline
SCE_Ghost
Member
Join Date: Feb 2009
Old 12-01-2009 , 22:51   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #39

Well that fixed it 99% I would recommend for the adding that to the instructions if your web interface is hosted elsewhere.
MrjNut that was a great write up!!

Here is the last problem:
Warning: Cannot modify header information - headers already sent by (output started at /home1/shadowc1/public_html/tf/tf2stats/inc/footer.inc.php:7) in /home1/shadowc1/public_html/tf/tf2stats/index.php on line 9
SCE_Ghost is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 12-01-2009 , 23:10   Re: TF2 Stats With Web Ranking and Item Logger
Reply With Quote #40

Quote:
Originally Posted by SCE_Ghost View Post
Here is the last problem:
Warning: Cannot modify header information - headers already sent by (output started at /home1/shadowc1/public_html/tf/tf2stats/inc/footer.inc.php:7) in /home1/shadowc1/public_html/tf/tf2stats/index.php on line 9
Thats odd, try this and see if the error is gone:
Attached Files
File Type: zip index.zip (1.2 KB, 172 views)
__________________
DarthNinja is offline
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


All times are GMT -4. The time now is 01:55.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode