Bug #28535 [Com]: exif_thumbnail not working correctly

From: Date: Thu, 03 Apr 2014 09:05:39 +0000
Subject: Bug #28535 [Com]: exif_thumbnail not working correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185058@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=28535&edit=1 ID: 28535 Comment by: ravime_Arvici at yahoo dot com Reported by: itch74 at hotmail dot com Summary: exif_thumbnail not working correctly Status: Not a bug Type: Bug Package: EXIF related Operating System: Win 2000 PHP Version: 4.3.4 Block user comment: N Private report: N New Comment: it's fault of utf-8 signature (bom) file starts output of bom and when you are setting hader headers are allready sent to browser and can't be modified remove any whitespace and bom from your file. dream, file save as > unicode options unckeck include unicode signature (bom) Previous Comments: ------------------------------------------------------------------------ [2004-05-26 21:43:08] iliaa@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The space between ?> and <?php gets sent and consequently prevents you from sending the header in 2nd php bit. ------------------------------------------------------------------------ [2004-05-26 21:40:38] itch74 at hotmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=28535&edit=1

« previous php.bugs (#185058) next »