ID: 24782 Updated by: [EMAIL PROTECTED] Reported By: odarcan at hotmail dot com -Status: Open +Status: Bogus Bug Type: Network related Operating System: win xp PHP Version: 4.3.2 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php reading from sockets will give you a packet sized chunk which can be less than the buffer size you requested. This is documented in the manual and has been the behaviour since sockets were introduced to PHP. Note that 4.3.0 and 4.3.1 were broken in that they would block your whole script to try to fulfill your request - breaking other peoples scripts. Previous Comments: ------------------------------------------------------------------------ [2003-07-23 19:22:46] odarcan at hotmail dot com Description: ------------ $pcstring=fread ($pcpointer,1000); $pcstring.=fread ($pcpointer,1000); $pcstring.=fread ($pcpointer,1000); $pcstring.=fread ($pcpointer,1000); $pcstring.=fread ($pcpointer,1000); is NOT the same as $string=fread ($pcpointer,5000); at least not in slow opening pages (as php scripts doing calculations) the second code only gives the headers while skipping the rest while the first shows echoed results from the php script (as it did with previous versions of php) putting a sleep(1); before the fread also solves this (for me at least). sleep(1); $string=fread ($pcpointer,5000); it has taken me 5 days to figure out what was wrong, FIVE DAYS... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24782&edit=1