ID: 24696 User updated by: peter at good-news dot no Reported By: peter at good-news dot no Status: Bogus Bug Type: *General Issues Operating System: Red Hat 9 PHP Version: 4.3.1 New Comment:
Well, I sorted it by flushing the socket. When you do multiply fwrites to a socket, and don't read everything back from the socket, in ssh fwrite will empty the socket on every occurence of fwrite, while in http the reply from the socket will be added onto the old reply! This might just be undocumented behaviour, but it certainly is annoying! Previous Comments: ------------------------------------------------------------------------ [2003-07-17 21:32:56] [EMAIL PROTECTED] Please go ask support questions elsewhere, no bug here. (or come up with a report someone actually wants to read through..with a SHORT example what isn't working, etc.) ------------------------------------------------------------------------ [2003-07-17 19:13:33] peter at good-news dot no I think the most intersting functions to look at will be: query() (game == HL part); get_time(); and possible parse_hl(); ------------------------------------------------------------------------ [2003-07-17 19:03:47] peter at good-news dot no Description: ------------ (Bare with me, this is my first report, and my English is simple!) I'm working on a multi-game script for querying game-servers. I've completed a few games that returns perfectly in both http and ssh. (I'm only using ssh for bug-tracking and testing.) Then I came to Half-life. In ssh the returned perfectly as expected (see submitted expected result), but when trying to run the script in http, it seems to get stuck in an endless loop not outputting anything (it's not even triggering max execution-time (30 seconds)) I don't know much about compiling nor configuring php (I just got my work space, I'm not server-admin), but this could be helpful http://www.good-news.no/info.php Reproduce code: --------------- http://www.good-news.no/peter/game/source.php <- source of my class http://www.good-news.no/peter/game/index.php <- should return a goodlookin' array(and does in ssh) and I call the script with...: $server = new server('HL', 'some-gameip-here'); // 66.28.14.60:27015 currently used echo $server->output; ...from another file in the same folder. A function that returned an error (IN HTTP, NOT SSH) earlier was get_time() , as it returned that unpack didn't get it's 4 bytes. This worked fine in ssh at the same time. Now in http I don't get any errors returned, just a blank never-stopping-to-load-page. Ssh works fine, which made me suspicious to a bug. Expected result: ---------------- Array ( [IP] => 66.28.14.60:27015 [hostname] => [OSF] Fraggin' Friar Tucks [OwP] [mapname] => de_inferno [gamedir] => cstrike [gamedes] => CounterStrike [maxplayers] => 16 [protocol] => 46 [stype] => Dedicated [os] => Windows [password] => No [numrules] => 76 [numplayers] => 2 [rules] => Array ( [admin_highlander] => 0 [admin_ignore_immunity] => 0 [admin_mod_version] => 2.50.55-beta (MM) [admin_quiet] => 2 [allow_client_exec] => 1 [allow_spectators] => 1 [amv_private_server] => 0 [coop] => 0 [deathmatch] => 1 [decalfrequency] => 30 [default_access] => 1 [edgefriction] => 2 [max_queries_sec] => 1 [max_queries_sec_global] => 1 [max_queries_window] => 1 [mp_allowmonsters] => 0 [mp_autokick] => 0 [mp_autoteambalance] => 1 [mp_buytime] => .75 [mp_c4timer] => 35 [mp_chattime] => 10 [mp_consistency] => 1 [mp_fadetoblack] => 0 [mp_flashlight] => 1 [mp_footsteps] => 1 [mp_forcecamera] => 0 [mp_forcechasecam] => 0 [mp_fragsleft] => 0 [mp_freezetime] => 6 [mp_friendlyfire] => 0 [mp_ghostfrequency] => 0.1 [mp_hostagepenalty] => 2 [mp_kickpercent] => 67 [mp_limitteams] => 1 [mp_logdetail] => 0 [mp_logfile] => 1 [mp_logmessages] => 1 [mp_mapvoteratio] => 51 [mp_maxrounds] => 0 [mp_mirrordamage] => 0 [mp_playerid] => 0 [mp_roundtime] => 5 [mp_startmoney] => 800 [mp_timeleft] => 0 [mp_timelimit] => 30 [mp_tkpunish] => 1 [mp_winlimit] => 20 [pausable] => 0 [public_slots_free] => 14 [reserve_slots] => 1 [reserve_type] => 1 [sv_accelerate] => 5 [sv_aim] => 0 [sv_airaccelerate] => 10 [sv_airmove] => 1 [sv_allowupload] => 0 [sv_bounce] => 1 [sv_cheats] => 0 [sv_clienttrace] => 1 [sv_clipmode] => 0 [sv_contact] => [EMAIL PROTECTED] [sv_friction] => 4 [sv_gravity] => 800 [sv_logblocks] => 0 [sv_maxrate] => 6500 [sv_maxspeed] => 320 [sv_minrate] => 1500 [sv_password] => 0 [sv_proxies] => 0 [sv_restart] => 0 [sv_restartround] => 0 [sv_stepsize] => 18 [sv_stopspeed] => 75 [sv_voiceenable] => 1 [sv_wateraccelerate] => 10 [sv_waterfriction] => 1 ) [teams] => <table class="teamtable" cellpadding=1 cellspacing=0> <tr> <td class="playerhead">Player</td><td class="fraghead">Frags</td><td class="pinghead">Time Online</td> </tr><tr> <td class="player">[Joe]George_a_Greene</td><td class="score">5</td><td class="ping">09:28:21</td> </tr> <tr> <td class="player_">[Joe]Merry_Man</td><td class="score_">1</td><td class="ping_">09:28:21</td> </tr> </table> ) Actual result: -------------- nothing... >( ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24696&edit=1