From: [EMAIL PROTECTED] Operating system: FreeBSD 4.7 PHP version: 4.3.0 PHP Bug Type: Sockets related Bug description: socket_read PHP_NORMAL_READ problem
$string = socket_read( $socket, 100, PHP_NORMAL_READ ); will return a "\n" after several reads, and continue to return "\n" in an infinite loop rather than the rest of the buffer. The server it's reading from sends a large multi-line (lines terminated with "\n") packet (~7500 bytes) in one write() call. After reading through about half of it with the line above, socket_read will start returning bad data about 10% - 20% of the time. -- Edit bug report at http://bugs.php.net/?id=21760&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21760&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21760&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21760&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21760&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21760&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21760&r=support Expected behavior: http://bugs.php.net/fix.php?id=21760&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21760&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21760&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21760&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21760&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21760&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21760&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21760&r=gnused