php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26251 control on output buffering while printing images from binary data from db
Submitted: 2003-11-14 07:51 UTC Modified: 2003-11-14 10:36 UTC
From: narayanamurthi at eventurers dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.2 OS: Linux/apache server
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: narayanamurthi at eventurers dot com
New email:
PHP Version: OS:

 

 [2003-11-14 07:51 UTC] 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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-11-14 10:36 UTC] iliaa@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 05 06:01:28 2024 UTC