From:             itch74 at hotmail dot com
Operating system: Win 2000
PHP version:      4.3.4
PHP Bug Type:     Output Control
Bug description:  exif_thumbnail not working correctly

Description:
------------
While exif_thumbnail function works its practical use seems limited.

Using php 4.3.4 and the latest apache 2.0 build (5/04) the thumbnail of an
image will not be
displayed correctly unless some unknown circumstance exists.  For example:
 if you use the
script:

<?php
 $image = exif_thumbnail('griffon1.jpg');
  header("Content-type: image/jpeg");
  echo $image;
?>

This will work however, if you use this following script (1 php file):

<?php
// test
?>

<?php
 $image = exif_thumbnail('griffon1.jpg');
 header("Content-type: image/jpeg");
 echo $image;
?>

You will receive this error: 
Warning: Cannot modify header information - headers already sent by
(output started at
C:\apache\Apache2\htdocs\index2.php:5) in
C:\apache\Apache2\htdocs\index2.php on line 7

followed by raw image data, not the image itself.

I have also tried using ob_start and ob_flush at the
beginning and ending of the page.. .this will remove the warning, but you
will not see the image, only the raw image data.

Reproduce code:
---------------
<?php
// test
?>

<?php
 $image = exif_thumbnail('griffon1.jpg');
 header("Content-type: image/jpeg");
 echo $image;
?>

Expected result:
----------------
Viewing the thumbnail of an image.

Actual result:
--------------
Raw image data output, no picture.

-- 
Edit bug report at http://bugs.php.net/?id=28535&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28535&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28535&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28535&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28535&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28535&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28535&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28535&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28535&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28535&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28535&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28535&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28535&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28535&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28535&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28535&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28535&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28535&r=float

Reply via email to