ShadowFlare's Realm
http://sfsrealm.hopto.org/cgi-bin/yabb2/YaBB.pl
ShadowFlare's Realm Forums >> Program Development >> Install PHP Warcraft III Replay Parser!!! Help
http://sfsrealm.hopto.org/cgi-bin/yabb2/YaBB.pl?num=1107063124

Message started by tfq on Jan 30th, 2005, 6:32am

Title: Install PHP Warcraft III Replay Parser!!! Help
Post by tfq on Jan 30th, 2005, 6:32am

Hi all

Plz helpme!!!

I dont know install your script!!!
I need put in mi site but i dont no how install!!

Helpme plz

Thx

sry, mi english is sux :-/

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by Julas.wtfwrongpass on Mar 14th, 2005, 4:14pm

Error: not enough data.

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 9:48am

ok, im have the same problem, but i have more information.... in my case....i have apache 2.x runing in my machine, php 5.03, but i dont know what should i do for to run the script example.php, in my page i have moodle install, and for to configure it i haved to configured some thinks about apache and php, but i dont know what should i configure for to run the script, what should i create (folders, archives, etc..), when i run the script, i have this error....well all the page have error, nothing is good , only show the php code in the page etc, the first error is : 1|1| Replay folder contains no replays!, in the example scipt i configure the path of the replays, and the other path, the text path, i put the same in both.....what should i do?, i other post comment that i have to create the "database" folder because the sealize() function, but nothing happend :/, my replays are in a partition of my disk and i use the path : 'D:/replays/', what else??

sorry for my english plz, thx for all, and my congratulations for the script and all the people that work on it, for the archives, w3g_actions etc, thx for all, im not an expert on ensambler languaje but i understand.....thx for all

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by Julas.wtfwrongpass on May 3rd, 2005, 10:03am

It would be best if you gave me the link to your server. If you don't have a public IP, then paste all the errors here.

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 10:11am

1|1| Replay folder contains no replays!

'); } } else { echo('
Can\'t read replay folder!

'); } // listing replays - short info if (!$id && !$_FILES['replay_file']) { echo('
index of '.$w3g_path.'
'.$i.' total
'); ?>
Check your own replay!
File:  Gateway:  Lordaeron Azeroth Northrend Kalimdor  
'.$replay_file.' download('.round(filesize($w3g_path.$replay_file.'.w3g')/1024).' KB)
'); $txt_file = fopen($txt_path.$replay_file.'.txt', 'r'); flock($txt_file, 1); $replay = unserialize(fgets($txt_file)); flock($txt_file, 3); fclose($txt_file); $i = 1; foreach ($replay->teams as $team=>$players) { if ($team !== 12) { echo('team '.$i.': '); foreach ($players as $player) { echo(' '); if ($player['race'] == 'Random') { echo(' '); } echo(''.$player['name'].' ('.round($player['apm']).' APM)'); } echo('
'); $i++; } } $temp = strpos($replay->game['map'], ')')+1; $map = substr($replay->game['map'], $temp, strlen($replay->game['map'])-$temp-4); $version = sprintf('%02d', $replay->header['major_v']); echo($replay->game['type']); if ($replay->game['referees'] == 'Yes') { echo(' with Referees'); } elseif ($replay->teams['12']) { echo(' with Observers'); } echo(' | '.$map.' | '.convert_time($replay->header['length']).' | v1.'.$version.' '.$replay->header['ident'].''); } echo(''); // details about the replay } else { $pos = array_search($id, $replays); $prev = $replays[$pos-1]; $next = $replays[$pos+1]; echo('
'.$id.' details
prev index next
'); if (file_exists($txt_path.$id.'.txt')) { $txt_file = fopen($txt_path.$id.'.txt', 'r'); flock($txt_file, 1); $replay = unserialize(fgets($txt_file)); flock($txt_file, 3); fclose($txt_file); } elseif ($id) { $replay = new replay($w3g_path.$id.'.w3g'); } elseif ($_FILES['replay_file']['tmp_name']) { $replay = new replay($_FILES['replay_file']['tmp_name']); $gateway = $_POST['gateway']; } else { echo('No replay file given!'); $error = 1; } if (!$error) { if ($replay->errors) { echo('
Warning! The script has encountered some errors when parsing the replay. Please report them to the author. details

basicly is like that all the page

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by Julas.wtfwrongpass on May 3rd, 2005, 10:18am

Uh... pretty weird. Seems like PHP stops parsing the file after showing an error. Have you changed anything in example.php? That "1|1| " looks suspicious...
Try reinstalling PHP or installign a 4.x version.

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 10:24am

i think is gonna be the version, but is strange, because i have many thinks running on this server, and dont know what happend, let me pass u the link

upn.httpserve.com/moodle   this page work well
upn.httpserve.com/temp    this doesnt

where should i put the replays and the database folder?, in the same path of the page??? or somethink?

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 10:26am

lol sorry is upn.servehttp.com/moodle and temp
no httpserve

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by Julas.wtfwrongpass on May 3rd, 2005, 10:40am

Have you used any Microshit software to edit parser's php files? If yes then make sure you haven't saved those files as UTF-8 with signature. Pure UTF-8 is OK but Microshit's signature may ruin everything.

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 10:48am

i use notepad++ v 2.9 (http://notepad-plus.sourceforge.net/es/site.htm) i saved the files like ANSI format, now, i saved with UTF-8 like u said me, but nothing happend....:S, any comments, i think is gonna be the version, and if is true, is gonna be sad, cos is my first time with php, and thinked start with the last version, :S but, well, im going to change it to 4.x or somethink..... unless u tell me how to fix it with this version, any archive or command in php, like globlals on, etc... that should i active...anyway thx for all.

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by Julas.wtfwrongpass on May 3rd, 2005, 10:51am

Try doing one more thing - download my parser once again and put all the files into the server directory once again without changing anything in them. Then check if the script still displays its own source.

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 10:56am

ok master yoda.....downloading...should i put the path of my web directory??..

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 10:58am

well the 1|1| think change :P, is better dont u?

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 11:04am

i try to reproduce the 1|1| with a copy of an archive that i modified, but doesnt work  ??? , why occur this?  :o

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by Julas.wtfwrongpass on May 3rd, 2005, 11:08am

PHP simply doesn't parse the file...
OK, it's the last thing I can think of - change all the "<?" to "<?php" or change the proper setting in your php.ini to allow "<?".

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 11:16am

oooommmmmggggg, that sounds good, i remember change some like that in the php.ini archive, let me see.............is working..., well with others errors, but is now parse php, parse is like compilant or somethink??, well anyway, the next step is solve the new problems, but is courious, how and insignificant think may cause many time spend, always happend whe i programing in other languajes, but im a newbie in this... thx so much, and for last time, sorry for my english jeje :P im a latin guy that only speak spanish....upn.servehttp.com/temp/

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 11:20am

when i change the name of the file for index.php , doesn work, but when i put example.php yes.....why that happend??

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 11:24am

i inicialize the w3g_path variable with 'replays/', and now works, but, now have other errors :S

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by Julas.wtfwrongpass on May 3rd, 2005, 11:26am

Don't know. As for the notices, change
error_reporting  =  E_ALL
to
error_reporting  =  E_ALL & ~E_NOTICE
in your php.ini

Title: Re: Install PHP Warcraft III Replay Parser!!! Help
Post by KarOn on May 3rd, 2005, 11:31am

exelent, i ocult the notices, is safe than in my page appears the notice showing the path of my apache directory??, and what happend?, and why should i use the UTF-8 format??, well, i u dont want dons asnwer, ur help i good enought for me, thx for all, and c u later bro.... 8)

ShadowFlare's Realm » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.