From:             [EMAIL PROTECTED]
Operating system: Windows 9x
PHP version:      4.2.0
PHP Bug Type:     Sockets related
Bug description:  socket_read() does not have the described behaviour ...

In the documentation, it's written that socket_read() reads data from the
socket until a \n, \t, \0.... or until the end of the buffer.
But under win32 it reads only 1 char.

This would be fixed.

Just use instead :
$buf="";
while (substr($buf,-1)!="\n") {
  $buf.=socket_read($socket,1);
}

I've put 1 here, but you can write 16777216 it'll continue to give back
only 1 char.
-- 
Edit bug report at http://bugs.php.net/?id=16680&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16680&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16680&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16680&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16680&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16680&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16680&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16680&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16680&r=submittedtwice

Reply via email to