# BF2Statistics v1.4

Discussion in 'BF2Statistics discussion' started by MrNiceGuy, Oct 3, 2006.

1. ### MrNiceGuyFounderStaff Member

All support and questions for BF2Statistics v1.4 goes here.

Previous thread *Unofficial* bf2statistics v1.3 RC1 can be found here: http://www.bf2statistics.com/e107_plugins/forum/forum_viewtopic.php?2618.0

MrNiceGuy.

2. ### SumoWeezleNew Member

Excellent job to all involved in getting this out the door. I look forward to the new features.

Sumo

3. ### TKNew Member

php 4.4.4

The first item that you may have stumbled across is the method __construct(). This is the new constructor method in PHP 5. In the good old days of PHP 4, constructor names matched their classes. That changed with PHP 5.

so ...

4. ### csunoNew Member

there is a mistake in \\bf2statistics_1.4.0\UtilScripts\BF2ProcessGameLog.vbs
Code:
' Desc:	This script enables/disables the HOSTS file workaround
'		for BF2 Private Statistics.  It supports dynamic IPs and can
'		Enable/Disable the entry via way of a runtime argument.
'		Execution is silent.  Change the string lookup variables to suit.

This should be:
Code:
This script automatically extracts SNAPSHOT data from your Game Server Debug log.
The extracted files can then be copied to the logs directory on your Web Server
for importing...  This is useful for situations where the SNAPSHOT log data failed
to reach the Gamespy server due to connectivity problems.

Or is this wrong? YOURS CSUNO
_________________________________
BTW...

isnt it better to make a blank new install, of DB and the ASP files? Instead of upgrade them?
So, i will try to delete the existing DB (with backup, of course!) make a new install of all the BF2stat stuff, and reparse the stored log files!
Wont, that be the better way? (My BF2STAT 1.3RC1P4 works fine, for now!)

5. ### MrNiceGuyFounderStaff Member

Better wait for The Shadow to answer your questions, but about the db, if u already have a db full of data, i would suggest it's better to upgrade it, instead of starting all over as u said. That way you are shure the data isnt "corruped" in any way... [/html]

Doh!! Sorry I've been doing my dev on PHP5. Does the config class actually work on PHP 4.x? If not we'll have to redo that for proper PHP4 support.

Oops. You are right... I'll update this for 1.4.1.

==================================================
PHP 4.3.x Compatibility Update!!!
==================================================

In my race to embrace a new configuration management class, I forgot to ensure this was compatible with PHP 4.3.x. Thanks to TK for pointing this out. Anyway, I've made a small change to the /ASP/includes/ustil.php file that should solve this. I'm able to test this, but I'm confident it'll solve this issue. !dodge

1159925342_1586_FT3118_utils_php4.3_compat.zip

10. ### KinsmanNew Member

What web scripts should we be hooking this up to, the old ones?

Should work with any Web Stats system that is compatible with the official bf2web.gamespy.com stats.
This includes:
- Brainpecker BF2 Stats Query
- BF2Statistics Web stats (out-of-date, but should still work)
- Others...

12. ### TKNew Member

I'm afraid i will have to dissapoint The Shadow ... simply using overload function will not resolve this

Do you know an easy way then? I would rather not re-write all of the config management code. (
But, if that is what it takes...

Looks like I'll have to break out a PHP4 dev environment. My apologies to all those PHP4 users. I'll get this fixed ASAP.

14. ### thunderNew Member

i have a funny prob. .... i canÂ´t access the admin page ... he say:

I insert my ip in the _config.php, no effect !

I use a linux server with apache2 and php Version 4.3.10
On the local machine i become the same error ....

There is a major bug with the parsing of the config file with PHP4. I'm working on a fix, so this should be sort very soon....

same problem

17. ### virtualinsanityNew Member

fixed it by switching from php 4 to php 5

18. ### virtualinsanityNew Member

another ptoblem
then cleanup my base
and reimport logs
not all stats reimported
in _stats_errors
many lines with

2006-10-04 19:19:15 -- ERROR: ERROR: Duplicate entry '29000108-1159964355' for key 1
Query String: INSERT INTO player_history SET
id = 29000108,
timestamp = 1159964355,
time = 317,
score = 5,
cmdscore = 0,
skillscore = 2,
teamscore = 3,
kills = 1,
deaths = 3,
rank = 0
2006-10-04 19:19:16 -- ERROR: ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
team2 = ,
tickets1 = ,
tickets2 = ,
pids1 = 0,
pids1_en' at line 5
Query String: INSERT INTO round_history SET
timestamp = 1158748203.31,
mapid = 101,
time = 716.830000162,
team1 = ,
team2 = ,
tickets1 = ,
tickets2 = ,
pids1 = 0,
pids1_end = 0,
pids2 = 0,
pids2_end` = 0

2006-10-04 19:19:16 -- SECURITY: SNAPSHOT Data File Processed: BF2-dalian_plant_20060920_1730.txt

19. ### ObinaNew Member

Linux/Unix systems working case sensitive, so you have to rename images/BF2logo.png into images/bf2logo.png...
just for prevent other questions about the red cross in the left top corner ;-)