#26251 [Opn->Bgs]: control on output buffering while printing images from binary data from db

From: Date: Fri, 14 Nov 2003 15:36:50 +0000
Subject: #26251 [Opn->Bgs]: control on output buffering while printing images from binary data from db
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-50394@lists.php.net to get a copy of this message
 ID:               26251
 Updated by:       iliaa@php.net
 Reported By:      narayanamurthi at eventurers dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Linux/apache server
 PHP Version:      4.3.2
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is not a support forum.


Previous Comments:
------------------------------------------------------------------------

[2003-11-14 07:51:23] narayanamurthi at eventurers dot com

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 this bug report at http://bugs.php.net/?id=26251&edit=1


Thread (2 messages)

« previous php.bugs (#50394) next »