ohio813 / phpsc2replay

Automatically exported from code.google.com/p/phpsc2replay
0 stars 0 forks source link

Unable to parse file on remote Unix system #59

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Download the attached .SC2Replay file and the .php file
2. Parse the replay on a remote Unix server and on local Windows machine using 
EasyPHP 5.3.6

What is the expected output? What do you see instead?

Expected:
Player 1: oGsTheStC
Player 2: MillStephano
Player 1 ID: 3107743
Player 2 ID: 2808471
P1 Winner: 1
P2 Winner: 0
P1 is comp:
P2 is comp:
Map: IPL 3 Antiga Shipyard
Game Speed: Faster
Real team size: 1v1
P1 Total Actions: 5641
P2 Total Actions: 8415

Output:
Player 1: oGsTheStC
Player 2: MillStephano
Player 1 ID: 3107743
Player 2 ID: 2808471
P1 Winner: 1
P2 Winner:
P1 is comp:
P2 is comp:
Map: IPL 3 Antiga Shipyard
Game Speed: Slower
Real team size:
P1 Total Actions: 0
P2 Total Actions: 0

What version of the product are you using? On what operating system?

phpsc2replay-1.61

Please provide any additional information below.

The parsing is done correctly on the local Windows machine, running EasyPHP 
5.3.6 and it outputs the expected data.
However, when I put it on a remote Unix web server the parsing seems to fail 
somehow. I've tried it on two Unix web servers, both give me the same wrong 
output.

Original issue reported on code.google.com by sgsfabi...@gmail.com on 28 Nov 2011 at 3:12

Attachments:

GoogleCodeExporter commented 9 years ago
I just noticed most of the issue is related to the parser being unable to parse 
some arrays:

$parser->getEvents()
$parser->getPlayers()[1]['apm']
$parser->getPlayers()[1]['apmtotal']

What could be causing the parser to work just fine in localhost and not on a 
remote server? So weird... :/

Original comment by sgsfabi...@gmail.com on 28 Nov 2011 at 10:27

GoogleCodeExporter commented 9 years ago
Just to add more info:

In the local Windows machine I run PHP 5.3.6.
They run PHP 5.2.5-pl1-gentoo on one of the Unix remote server, and PHP 5.2.9 
on the other.

Incompatibilities maybe?

Original comment by sgsfabi...@gmail.com on 28 Nov 2011 at 10:50

GoogleCodeExporter commented 9 years ago
The most common issue is that the PHP installation is missing the bzip2 module, 
so check that first. Some larger files (especially the replay.game.events file) 
in the MPQ archive are compressed with bzip2 and thus fail to parse without it.

Original comment by lauri.vi...@gmail.com on 29 Nov 2011 at 11:34

GoogleCodeExporter commented 9 years ago
Ok, I believe you are right.

I've tested a bzip2 script on the local machine and it worked, but the same
script didn't work on the remote machines.

Thank you for your awesome work!

Original comment by sgsfabi...@gmail.com on 30 Nov 2011 at 3:02