From: dinklage at dinklage dot com Operating system: Linux PHP version: 4.3.4 PHP Bug Type: Filesystem function related Bug description: fread() with URL reads only part of file
Description: ------------ Using fread() with URL returns only a part of the file: eg: reading http://schreiners-buero.de/sbinfo.htm with 25170 Byte is only 2550 Byte Reproduce code: --------------- $url='http://schreiners-buero.de/sbinfo.htm'; $fp = fopen($url,'rb'); $code = fread($fp,4000000); fclose($fp); echo "<p>length ".strlen($code)." </p>"; $code2=file_get_contents($url); echo "<p>length ".strlen($code2)." </p>"; exit; -- Edit bug report at http://bugs.php.net/?id=26877&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26877&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26877&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26877&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26877&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26877&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26877&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26877&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26877&r=support Expected behavior: http://bugs.php.net/fix.php?id=26877&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26877&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26877&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26877&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26877&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26877&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26877&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26877&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26877&r=float