From: info at loyaa dot com Operating system: Win2000 PHP version: 4.3.2 PHP Bug Type: GD related Bug description: Premature end of picture file
Description: ------------ I want through GD get picture file on internet, But GD version bundled (2.0.12 compatible) of PHP 4.3.2 or higher can't work normally. The phenomenon as follows: 1. Can't totally obtain the goal file. 2. Premature end of picture file. PHP 4.2.2 (GD version 2.0 or higher) work normally. Reproduce code: --------------- $fileURL = 'http://bugs.php.net/gifs/logo-bug.gif'; $file_fp = @fopen(trim($fileURL),'r'); $file = @fread($file_fp,5000000); Header("Content-type: image/gif"); echo $file; @fclose($file_fp); Expected result: ---------------- GD version bundled (2.0.12 compatible) or higher Actual result: -------------- PHP Version 4.2.2 GD Version 2.0 or higher work normally. -------------------------------- $fileURL = 'http://bugs.php.net/gifs/logo-bug.gif'; $file_fp = @fopen(trim($fileURL),'r'); $file = @fread($file_fp,5000000); Header("Content-type: image/gif"); echo $file; @fclose($file_fp); -- Edit bug report at http://bugs.php.net/?id=25546&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25546&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25546&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25546&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25546&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25546&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25546&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25546&r=support Expected behavior: http://bugs.php.net/fix.php?id=25546&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25546&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25546&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25546&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25546&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25546&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25546&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25546&r=gnused