evilru / quake3-vsp-stats

VSP Stats Game Log Processor - updated and working version of vsp-0.45-xp-1.2-full.zip from https://vsp.goquake.com/ as docker image: https://hub.docker.com/r/evilru/quake3-vsp-stats.
MIT License
11 stars 10 forks source link

Works with PHP 7.3.15 and MySQL 5.7 #4

Closed hbokh closed 4 years ago

hbokh commented 4 years ago

Hi! Not an issue to report, but to inform you I got this working with PHP 7.3.15 and MySQL 5.7.29-32. Had to make some small adjustments:

This line https://github.com/evilru/quake3-vsp-stats/blob/master/vsp.php#L1355 should read

$V0f14082c['parser-options'] = array("");

Props are for @jf3218 for this one.

Due to datetime in lines like this https://github.com/evilru/quake3-vsp-stats/blob/master/sql/mysqli.inc.php#L74 had to set this first in MySQL for the vsp database:

mysql> SET sql_mode = '';

Output

# php vsp.php -l q3a-freeze -p savestate 0 "/home/hbokh/games.log"

 -----------------------------------------------------------------------------
                     vsp stats processor (c) 2004-2005
                               version 0.45-xp-1.1.2
                 vsp by myrddin (myrddin8 AT gmail DOT com)
 -----------------------------------------------------------------------------

max_execution_time is 0

[command-line options]: Array
(
    [parser-options] => Array
        (
            [0] =>
            [gametype] => freeze
            [savestate] => 0
        )

    [prompt] => 1
    [log-gamecode] => q3a
    [log-gametype] => freeze
    [logfile] => /home/hbokh/games.log
    [config] => pub/configs/cfg-default.php
)
[parser options]: Array
(
    [savestate] => 0
    [gametype] => freeze
    [backuppath] =>
    [trackID] => playerName
    [xp_version] => 200
    [0] =>
)
Analyzing game 0001 (00.37%) warmup game, ignored
Analyzing game 0002 (02.70%) updating database...done
Analyzing game 0003 (98.93%) warmup game, ignored

generateAwards: Generating Awards...done

games: parsed: 1    inserted: 1  ignored: 0

 -----------------------------------------------------------------------------
                     vsp stats processor (c) 2004-2005
                               version 0.45-xp-1.1.2
                 vsp by myrddin (myrddin8 AT gmail DOT com)
 -----------------------------------------------------------------------------

processed in 0m 0s (0.455051s)
Lice2 commented 3 years ago

Unfortunately that doesn't work for me. In vsp.php I have the line on $ V0f14082c ['parser-options'] = array (""); changed. And in the Mysql database the command mysql> SET sql_mode = ''; executed. Then I ran php vsp.php -l q3a games.log. Then he started again 1971-12-28 23:59:59.

Lice2 commented 3 years ago

`


                 vsp stats processor (c) 2004-2005                         
                           version 0.45-xp-1.1.2                                    
             vsp by myrddin (myrddin8 AT gmail DOT com)                    

max_execution_time is 0

( [parser-options] => Array ( [0] => )

[prompt] => 1
[log-gamecode] => q3a
[log-gametype] => 
[logfile] => /home/lice/.q3a/baseq3/games.log
[config] => pub/configs/cfg-default.php

) Populating ip to country table...done

( [savestate] => 0 [gametype] => [backuppath] => [trackID] => playerName [xp_version] => 200 [0] => ) Analyzing game 0001 (19.02%) updating database...done Analyzing game 0002 (53.50%) duplicated game timestamp, ignored

generateAwards: Generating Awards...done

games: parsed: 2 inserted: 1 ignored: 1


                 vsp stats processor (c) 2004-2005                         
                           version 0.45-xp-1.1.2                                    
             vsp by myrddin (myrddin8 AT gmail DOT com)                    

processed in 0m 0s (0.764345s)`