Bug #17887: unable to read complete data stream with set_socket_blocked($fp,0)

From: Date: Thu, 20 Jun 2002 21:55:33 +0000
Subject: Bug #17887: unable to read complete data stream with set_socket_blocked($fp,0)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-11612@lists.php.net to get a copy of this message
From: sdsdgdds@yahoo.de Operating system: Win XP PHP version: 4.2.1 PHP Bug Type: Sockets related Bug description: unable to read complete data stream with set_socket_blocked($fp,0) First of all I have to make a sleep() before I read data. Otherwise I don't receive any. It doesn't matter how long I sleep I allways get the same amount of data. $ns = fsockopen("anyuri",80,$a,$a,$max); $out=""; socket_set_blocking($ns,0); fputs($ns,"GET / HTTP/1.1\r\nHost: anyuri\r\nConnection: close\r\n\r\n"); sleep(1); while(!feof($ns)) $out.=strtolower(fread($ns,128)); and how do I get the rest? I tried to make another sleep and fread but there comes nothing. Even if I made socket_set_blocking($ns,1); and tried to read the rest I received nothing. Everything works fine if I don't use socket_set_blocking($ns,0); I tried it on some big sites and the maximum was about 25000 bytes! -- Edit bug report at http://bugs.php.net/?id=17887&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17887&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17887&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17887&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17887&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17887&r=support Expected behavior: http://bugs.php.net/fix.php?id=17887&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17887&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17887&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17887&r=globals

« previous php.bugs (#11612) next »