From: Operating system: centos5 x86_64 GNU/Linux PHP version: 6SVN-2010-04-15 (SVN) Package: GD related Bug Type: Bug Bug description:imagepng,imagegif not function properly
Description: ------------ while running as cgi on nginx(the response is 'chunked' according to firebug), and ob_start is activated using imagepng,imagegif to outputimages to the browsers, these two are not correct, the browser only received part of the image, while imagejpeg is correct. And without ob_start or running as apache+mod_php(response not 'chunked') all three are correct. And if add 'ob_end_clean()' before imagepng, it worked correctly. phpinfo: gd GD Support enabled GD Version bundled (2.0.34 compatible) FreeType Support enabled FreeType Linkage with freetype FreeType Version 2.2.1 GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled Test script: --------------- ob_start(); header('Content-type: image/png'); imagepng(imagecreatefrompng('/home/webroot/a.png')); //imagegif(imagecreatefrompng('/home/webroot/a.png')); //imagejpeg(imagecreatefrompng('/home/webroot/a.png')); exit; Expected result: ---------------- the image rendered entirely Actual result: -------------- firefox:the image rendered partly ie6: imagepng and imagegif behaves more weirdly -- Edit bug report at http://bugs.php.net/bug.php?id=51556&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51556&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51556&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51556&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51556&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51556&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51556&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51556&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51556&r=needscript Try newer version: http://bugs.php.net/fix.php?id=51556&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51556&r=support Expected behavior: http://bugs.php.net/fix.php?id=51556&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51556&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51556&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51556&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51556&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=51556&r=dst IIS Stability: http://bugs.php.net/fix.php?id=51556&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51556&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51556&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51556&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51556&r=mysqlcfg