ImportBot Posted February 28, 2012 Author Share Posted February 28, 2012 Originally Posted by ty_ger07*: http://bl1ndy.branspace.com/player_stats.php Why do all my player status messages say Unknown? If you click on the "Unknown" button, you will see "GGC-Stream returned no results". These are the possible causes: 1) Your GGC-Stream account is not set up or is not set up correctly 2) You have not provided the correct GGC-Stream server ID and/or have not provided the correct GGC-Stream API Key 3) GGC-Stream's server is down 4) GGC-Stream has received too many requests from your API key recently which caused GGC-Stream's flood protection to kick in * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 28, 2012 Author Share Posted February 28, 2012 Originally Posted by MorpheusX(AUT)*: Page not loading for me... See: http://morpheusx.at/bf3/serverstats/player_stats.php MySQL-Connection correct + working (tested with leibhold's small snippet). I've just checked my php-errors Logfile, and it throws this error every time I try to load the page: Code: [28-Feb-2012 09:37:16 UTC] PHP Parse error: syntax error, unexpected $end in C:\inetpub\wwwroot\morpheusx.at\bf3\serverstats\player_stats.php on line 1553Line 1553 is the end of the document... php/IIS 7 should be configured correctly (no problems with other webpages, phpMyAdmin or leibhold's adminpage are working fine too). Here's what I've put in the file: Code: <_php// DATABASE INFORMATION $db['host'] ='localhost'; // database host $db['uname'] ='USER'; // database user name $db['pass'] ='PASSWORD'; // database password $db['name'] ='proconbf3'; // database name // DATABASE TABLE SUFFIX $table_suffix =''; // if you use a table suffix, enter it there // DATABASE SERVER ID $server_ID ='3'; // default server ID is 1. If using more than one server in the same database without table suffixes, you can select a server other than the first one. // GGC-STREAM INFORMATION $serverId = 'ID'; // server ID $key = 'KEY'; // API Key // SERVER NAME $server_name = 'bfcom.org - 1000 Tickets Metro only 24/7 NO ROCKETS/M320/USAS!'; // server name to display // CLAN NAME $clan_name = 'BFcom.org - Deine Community!'; // your gaming clan or organization name _>I've also tried with different hosts/usernames, but no luck either. Also tried changing server/clanname and GGC-Stream information, but that didn't do anything...MySQL-Port is open (confirmed by ping.eu and own tests), webserver seems not to block SQL (since phpMyAdmin and leibhold's adminpage wouldn't work if it would). Can upload a phpinfo() page if needed. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 28, 2012 Author Share Posted February 28, 2012 Originally Posted by Bl1ndy*: If you click on the "Unknown" button, you will see "GGC-Stream returned no results". These are the possible causes: 1) Your GGC-Stream account is not set up or is not set up correctly 2) You have not provided the correct GGC-Stream server ID and/or have not provided the correct GGC-Stream API Key 3) GGC-Stream's server is down 4) GGC-Stream has received too many requests from your API key recently which caused GGC-Stream's flood protection to kick in I've added the server ID that showed up when i click My Servers at GGC-Stream. And i generated the API key under the user profile and added them both to the .php file. Dunno what went wrong then. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 28, 2012 Author Share Posted February 28, 2012 Originally Posted by Athlon*: Just wanted to say thanks (and show off the work) to all here who helped me. Our pages are working great! This is an awesome effort by ty_ger07. I customized the page a bit to give it some of the colors of our web site. Our guys wanted to see all players all the time too. We plan to reset the stats on the first of every month and keep each month's records as we go. The stats started recording on February 19th: http://www.wavgrp.com/wh/main.htm I also created a block for our home page that shows the current top three players (live updates). You can see it here (it's on the right hand side under the Donations block): http://www.warhawksclan.com/ * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 29, 2012 Author Share Posted February 29, 2012 Originally Posted by Bl1ndy*: It looks like GGC-Stream is only able to show me the results 10% of the time. When i spam F5 i sometimes see my bans pop-up. Really weird... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 29, 2012 Author Share Posted February 29, 2012 Originally Posted by ty_ger07*: Does your stats page have lots of traffic? Spamming F5 will make the problem worse. GGC-stream's flood protection kicks on if ypu have something like 10 requests In a minute. Then they won't give you any results until the 10 minute cool down timer expires. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 29, 2012 Author Share Posted February 29, 2012 Originally Posted by Bl1ndy*: I doubt that i have lots of traffic, the only place the link is displayed is the server description and its not linked to a website. I've made a ticket on GGC-Stream.com. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 29, 2012 Author Share Posted February 29, 2012 Originally Posted by ty_ger07*: Just wanted to say thanks (and show off the work) to all here who helped me. Our pages are working great! This is an awesome effort by ty_ger07. I customized the page a bit to give it some of the colors of our web site. Our guys wanted to see all players all the time too. We plan to reset the stats on the first of every month and keep each month's records as we go. The stats started recording on February 19th: http://www.wavgrp.com/wh/main.htm I also created a block for our home page that shows the current top three players (live updates). You can see it here (it's on the right hand side under the Donations block): http://www.warhawksclan.com/ Hmm... In your country stats page ( http://www.wavgrp.com/js/player_stat...countries=View ) player Asura_Kinkaid has a null (blank) country code. The null country code is causing the expand box not to operate properly. I didn't know a null country code was possible. I thought XpKiller's plugin automatically assigned the country code ' -- ' to a player with an unknown country code. I guess null results will need to be filtered out. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 29, 2012 Author Share Posted February 29, 2012 Originally Posted by ty_ger07*: Page not loading for me... See: http://morpheusx.at/bf3/serverstats/player_stats.php MySQL-Connection correct + working (tested with leibhold's small snippet). I've just checked my php-errors Logfile, and it throws this error every time I try to load the page: Code: [28-Feb-2012 09:37:16 UTC] PHP Parse error: syntax error, unexpected $end in C:\inetpub\wwwroot\morpheusx.at\bf3\serverstats\player_stats.php on line 1553Line 1553 is the end of the document... php/IIS 7 should be configured correctly (no problems with other webpages, phpMyAdmin or leibhold's adminpage are working fine too). Here's what I've put in the file: Code: <_php// DATABASE INFORMATION $db['host'] ='localhost'; // database host $db['uname'] ='USER'; // database user name $db['pass'] ='PASSWORD'; // database password $db['name'] ='proconbf3'; // database name // DATABASE TABLE SUFFIX $table_suffix =''; // if you use a table suffix, enter it there // DATABASE SERVER ID $server_ID ='3'; // default server ID is 1. If using more than one server in the same database without table suffixes, you can select a server other than the first one. // GGC-STREAM INFORMATION $serverId = 'ID'; // server ID $key = 'KEY'; // API Key // SERVER NAME $server_name = 'bfcom.org - 1000 Tickets Metro only 24/7 NO ROCKETS/M320/USAS!'; // server name to display // CLAN NAME $clan_name = 'BFcom.org - Deine Community!'; // your gaming clan or organization name _>I've also tried with different hosts/usernames, but no luck either. Also tried changing server/clanname and GGC-Stream information, but that didn't do anything...MySQL-Port is open (confirmed by ping.eu and own tests), webserver seems not to block SQL (since phpMyAdmin and leibhold's adminpage wouldn't work if it would). Can upload a phpinfo() page if needed. Hmmm.... That is odd. I can't find anything obviously wrong with what you have posted. Does your database username or password have a any quotation marks ( ' or " ) in them? If so, that could be the problem. Is the page being loaded inside of a page (included in a page)? If so, I would look at the parent page as the culprit. What causes this error? In fact, this error means that PHP has finished analyzing your code, but you forgot to close a symbol somewhere in your page or in those that were included. Situations: you forgot to close a quote, so PHP is continuing to analyze your code until it finds the closing quotation mark. You forgot to close a bracket, so from the last opening, PHP considers all the code that follows as part of a block that never ends. You forgot to close a parenthesis, so from the last open parenthesis, PHP considers all the code that follows as part of a specific block (condition, arguments of functions etc) that does not end. You forgot a comma, so for PHP there is an instruction in your code that has no end. http://en.kioskea.net/faq/3377-parse...unexpected-end I know the code is 'good' for everyone else (including me), so I would look at any changes you have made to the file as the culprit. 'Changes' include the values you added to the start of the file. Make sure that when you edited the file to add those values, you were using a text editor with WORD WRAP DISABLED. If the file is saved with word wrap enabled, it will wreak havoc on the code. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 29, 2012 Author Share Posted February 29, 2012 Originally Posted by leibhold*: server_name = 'bfcom.org - 1000 Tickets Metro only 24:mad:/:mad:7 NO ROCKETS:mad:/:mad:M320:mad:/:mad:USAS!'; // server name to display Boom Boom put a \ infront of a / else it will destroy your php flow. server_name = 'bfcom.org - 1000 Tickets Metro only 24\/7 NO ROCKETS ..... Or better still get rid of them all together. server_name = 'bfcom.org - 1000 Tickets Metro only 24-7 NO ROCKETS * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 29, 2012 Author Share Posted February 29, 2012 Originally Posted by MorpheusX(AUT)*: @ty_ger07: Page is neither included somewhere else, nor do password/username include any "special" characters (just a-z, A-Z, 0-9). I've edited the file with Notepad++, just re-unzipped the blank file and tried it with the "normal" windows notepad... Same result. @leibhold: I've also tried it with just "bfcom" before... Last test has Code: <_php// DATABASE INFORMATION $db['host'] ='localhost'; // database host $db['uname'] ='USER'; // database user name $db['pass'] ='PASSWORD'; // database password $db['name'] ='proconbf3'; // database name // DATABASE TABLE SUFFIX $table_suffix =''; // if you use a table suffix, enter it there // DATABASE SERVER ID $server_ID ='1'; // default server ID is 1. If using more than one server in the same database without table suffixes, you can select a server other than the first one. // GGC-STREAM INFORMATION $serverId = ''; // server ID $key = ''; // API Key // SERVER NAME $server_name = 'asd'; // server name to display // CLAN NAME $clan_name = 'asd'; // your gaming clan or organization name _>and it's still the same... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted February 29, 2012 Author Share Posted February 29, 2012 Originally Posted by ty_ger07*: You are sure that word wrap is not enabled, right? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by MorpheusX(AUT)*: Yup. It was disabled by default in Notepad++. I also tired enabling/disabling, didn't help either... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by leibhold*: I also have this error. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by ty_ger07*: I also have this error.... ? Well, you have access to the full code and PHP experience. Good luck finding the solution. Myself and many others do not have this issue. I just downloaded the code linked again and verified that I have no problem. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by leibhold*: ... ? . Myself and many others do not have this issue. I just downloaded the code linked again and verified that I have no problem. I was confirming that there is an issue in some situations - as Morpheaus is getting. While I appreciate this is not troubling you, and "many others" I simply downloaded the current version and ran the page to check. Well, you have access to the full code and PHP experience. Good luck finding the solutionUnless I get really bored, I will not be trawling though > 1500 lines of your code looking for the issue. Already reduced your code by how much witht he heading and section trickery? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by ty_ger07*: I was confirming that there is an issue in some situations - as Morpheaus is getting.So, what did you have to do in order to reproduce the issue? Did you have to use forward slashes or other special characters in the string inputs? Already reduced your code by how much witht he heading and section trickery?I am not sure what you are trying to say. I think you are missing a verb or something. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by leibhold*: So, what did you have to do in order to reproduce the issue? Did you have to use forward slashes or other special characters in the string inputs?No just copy the file to the server an use like normal. I am not sure what you are trying to say. I think you are missing a verb or something.I gave you the code to make your weapons blocks 3 lines instead of the 20 or so hard coded lines for each weapon block that you were using. - Enough verbs for you there ? EG //BEGIN ASSAULT RIFLES BLOCK Statsout("tbl_weapons_assaultrifle",$table_suffix, "Assault Rifle",$server_ID,$player_name); //END ASSAULT RIFLES BLOCK And BTW the code was all mine - not found on the internet as you say in the code. The only code part from the internet was the code above the line //Code found by leibhold on the internet, which was written by someone a lot smarter than us for getting column names from SQL. Lastly your ERROR Even though you dont really care as yours and many others work. On or about Line 26 and Line 1278 You have used instead of <_php> Some PHP installations do not accept This will cause php not to start the section and cause an unexpected end error * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by ty_ger07*: I'm not sure what I have done to offend you, but you seem to have become quite combative. Anyways, thanks for the help. Link in first post has been updated. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by leibhold*: Well, you have access to the full code and PHP experience. Good luck finding the solution. Myself and many others do not have this issue. I just downloaded the code linked again and verified that I have no problem.That is why I am "quite combative". This is your project - Yet I have had to go though 1500 lines of code to find the error. I feel if you put somethng like this out to the public - then I thnk you should support it. But thats just my opinion which has led to me coming over as a bit cranky. Who cares anyway - your code is fixed. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by MorpheusX(AUT)*: Thanks for that fix. Working perfectly now * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by MorpheusX(AUT)*: Yes. Here is an example: http://thetacteam.info/player_stats_main.php I have renamed my stats pages to player_stats1.php and player_stats2.php -- one for each server. But doing so, requires changing the _GET data file location in the code. I can explain more later when I have more time. Btw... Have you uploaded this page somewhere? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 1, 2012 Author Share Posted March 1, 2012 Originally Posted by leibhold*: Suggestion Replace all instances of player_stats.php in code with <_php echo _> eg Suspicious Players becomes Suspicious Players then you should be able to use any name for pages and have multiple for servers... * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted March 2, 2012 Author Share Posted March 2, 2012 Originally Posted by ty_ger07*: That's a good idea. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 2, 2012 Author Share Posted April 2, 2012 Originally Posted by ty_ger07*: Code in first post has been updated. Changes: - Fixed issue where reported KDR is very high if zero deaths. - Incorporated leibhold's suggestion for references to self. Now, you may name the player_stats.php file to any name you wish. This means that you can now have two separate files with different names and use one file for one server and another file for another server. You will still need to create an index page (an easy task for anyone capable with HTML) to link to each page. By having slightly different player_stats files referencing to different servers, you can create a stats page for each of your servers. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 11, 2012 Author Share Posted April 11, 2012 Originally Posted by Kinsman*: Hi, thanks for the cool script. because its a single page I thought I would have a go at pulling it into our site as a module. it went well on the test site. http://jw.servegame.org/index.php_name=stats And I even fixed all the links except for the search box, haven't quite figured that one out yet. Unfortunately, it didn't survive transfer to the live site. http://www.junglewraiths.net/index.php_name=stats gets the following errors there, the last one likely being the killer. modules/stats/index.php Notice line 23: Undefined index: search_player Notice line 30: Undefined index: suspicious_players Notice line 36: Undefined index: banned_players Notice line 42: Undefined index: top25_players Notice line 48: Undefined index: top25_countries Notice line 54: Undefined index: mapstats Notice line 62: Undefined variable: server_name Notice line 62: Undefined variable: clan_name Notice line 63: Undefined variable: clan_name Notice line 63: Undefined variable: server_name Notice line 64: Undefined variable: server_name Notice line 162: Undefined variable: PHP_SELF Notice line 171: Undefined variable: key Notice line 180: Undefined variable: PHP_SELF Notice line 183: Undefined variable: PHP_SELF Notice line 186: Undefined variable: PHP_SELF Notice line 189: Undefined variable: PHP_SELF Notice line 198: Undefined index: search_player Notice line 776: Undefined index: suspicious_players Notice line 966: Undefined index: banned_players Notice line 1095: Undefined index: top25_countries Notice line 1287: Undefined index: mapstats Notice line 1387: Undefined index: top25_players Notice line 1387: Undefined index: search_player Notice line 1387: Undefined index: suspicious_players Notice line 1387: Undefined index: banned_players Notice line 1387: Undefined index: top25_countries Notice line 1387: Undefined index: mapstats Notice line 1413: Undefined variable: server_name Notice line 1419: Undefined variable: table_suffix Notice line 1419: Undefined variable: table_suffix Notice line 1419: Undefined variable: table_suffix Notice line 1419: Undefined variable: server_ID Notice line 1427: Undefined variable: server_name Notice line 1510: Undefined variable: starttime Warning line : mysql_num_rows(): supplied argument is not a valid MySQL result resource They are connected to the same DB on my windows host, about all I can think of is the test site is PHP 5.3 whereas the live site is only 5.2.17 Any ideas? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 11, 2012 Author Share Posted April 11, 2012 Originally Posted by ty_ger07*: I will have to look into it, but I am guessing your problem is caused by an old PHP version. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 12, 2012 Author Share Posted April 12, 2012 Originally Posted by zAfLu*: Get the following error on startpage Top 25 players for Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/web1/html/reloaded/custom/bf3/player_stats.php on line 1450 PHP Version 5.2.6-1+lenny13Mysql Version Client (5.0.51a) Server (5.0.51a-24+lenny5) If you need more infos let me know * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 12, 2012 Author Share Posted April 12, 2012 Originally Posted by Kinsman*: Looks like definitely a PHP 5.2 bug then. If it helps here are my infos. Working Site. http://www.jw.servegame.org/info.php Non-Working Site (hosted). http://www.junglewraiths.net/info.php It might be something as simple as uppercase letter, or quotes instead of backticks, not sure. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted April 12, 2012 Author Share Posted April 12, 2012 Originally Posted by Kinsman*: Actually given it works on my WINDOWS host, and not my LINUX host, it seems quite likely its just a wrong case somewheres. I had a quick look at the tables and note that there is a lot of upper and lower cases in the columns. Will take me awhile to check it all, at work at the moment. * Restored post. It could be that the author is no longer active. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.