From: [EMAIL PROTECTED] Operating system: Linux PHP version: 5.2.5 PHP Bug Type: Streams related Bug description: progress notifications incorrec
Description: ------------ The stream progress notifications are reporting twice as high numbers (and twice as often) as they should. Reproduce code: --------------- <?php function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { switch($notification_code) { case STREAM_NOTIFY_PROGRESS: var_dump($bytes_transferred); break; } } $ctx = stream_context_create(); stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); $str = file_get_contents("http://no.php.net/get/php_manual_en.tar.gz/from/this/mirror", null, $ctx, 0, 8192); var_dump(strlen($str)); echo "\nDone!\n"; Expected result: ---------------- int(0) int(0) int(1440) int(2880) int(4320) int(5760) int(7200) int(8192) Done! Actual result: -------------- int(0) int(0) int(1440) int(2880) int(4320) int(5760) int(7200) int(8640) int(10080) int(11520) int(12960) int(14400) int(8192) -- Edit bug report at http://bugs.php.net/?id=44716&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44716&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44716&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44716&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44716&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44716&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44716&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44716&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44716&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44716&r=support Expected behavior: http://bugs.php.net/fix.php?id=44716&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44716&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44716&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44716&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44716&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44716&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44716&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44716&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44716&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44716&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44716&r=mysqlcfg