From: Operating system: Linux Aptosid PHP version: 5.3.3 Package: Streams related Bug Type: Bug Bug description:stream_get_contents offset max is 1165
Description: ------------ In the stream_get_contents function, the offset parameter's max value is 1165. Any upper value will block the script. Test script: --------------- // This will work... $handle = fopen($url, 'rb'); echo stream_get_contents($handle, 8192, 1165); // This will not work... the script will wait forever. $handle = fopen($url, 'rb'); echo stream_get_contents($handle, 8192, 1166); Expected result: ---------------- I expect this function not to wait if $offset + 8192 < $filesize -- Edit bug report at http://bugs.php.net/bug.php?id=53006&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53006&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53006&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53006&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53006&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53006&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53006&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53006&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53006&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53006&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53006&r=support Expected behavior: http://bugs.php.net/fix.php?id=53006&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53006&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53006&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53006&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53006&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53006&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53006&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53006&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53006&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53006&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53006&r=mysqlcfg