From: narayanamurthi at eventurers dot com Operating system: Linux/apache server PHP version: 4.3.2 PHP Bug Type: Unknown/Other Function Bug description: control on output buffering while printing images from binary data from db
Description: ------------ Hai, I have a set of coding which prints image from binary data stored in db. Actually the problem comes only when we print it between other outputs. The error is "headers are already sent...." . I have also tried buffering concept. If i use ob_start() and ob_end_flush() i couldn't get the image back. It is not printing anything.i couldn't help myself getting the work done. Please help me...Thanks in advance. Reproduce code: --------------- Here is the code //here some output statements $q = "select * from companyprof where userid=$id"; $v = $db->get_a_line($q); $image_type = $v["COMLogotype"];//image type $image = $v["COMLogo"];//binary data Header("Content-type: $image_type"); print $image; Expected result: ---------------- All I need is the image to be printed in the output. -- Edit bug report at http://bugs.php.net/?id=26251&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26251&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26251&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26251&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26251&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26251&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26251&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26251&r=support Expected behavior: http://bugs.php.net/fix.php?id=26251&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26251&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26251&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26251&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26251&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26251&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26251&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26251&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26251&r=float