Bug #66519 [Opn]: All EXIF related functions randomly return error

From: Date: Mon, 20 Jan 2014 10:36:12 +0000
Subject: Bug #66519 [Opn]: All EXIF related functions randomly return error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183913@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66519&edit=1 ID: 66519 User updated by: staviq at gmail dot com Reported by: staviq at gmail dot com Summary: All EXIF related functions randomly return error Status: Open Type: Bug Package: EXIF related Operating System: Windows 2012 PHP Version: 5.5.8 Block user comment: N Private report: N New Comment: EDIT 2: It got event stranger, if i call this script from CLI results are CORRECT most of the time, but if the same script is called from apache ( as http request ) result is most of the time INCORRECT. Previous Comments: ------------------------------------------------------------------------ [2014-01-20 10:27:32] staviq at gmail dot com EDIT: Inconsistent results are given for the same file, i might add. ------------------------------------------------------------------------ [2014-01-20 10:20:37] staviq at gmail dot com Description: ------------ All EXIF related function randomly out of nowhere return: Warning: exif_thumbnail(***FILENAME***): File too small (0) in ***SCRIPTNAME*** on line XXX Sometimes function like "exif_thumbnail", or "exif_read_data" will give me expected result, like a tumbnail or array of properties, but most of the time ( about 90% ) it will give me mentioned error. Tried on php 5.5.6 ( XAMPP bundled ) and 5.5.8 ( downloaded from php.net, used with nginx ) Test script: --------------- <? $i = "***FILENAME***"; $image = exif_thumbnail($i, $width, $height, $type); if( max( $width, $height ) == $width ) { $w = 256; $h = 256*( $height/$width ); } else { $h = 256; $w = 256*( $height/$width ); } echo "<img style=\"width: ".$w."px; height: ".$h."px;\" src='data:image/jpeg;base64,".base64_encode($image)."'>"; ?> Expected result: ---------------- Consistent result, either error every time, or expected thumbnail every time. Actual result: -------------- Warning: exif_thumbnail(P1030005.JPG): File too small (0) in E:\xampp\htdocs\t3.php on line 3 Warning: Division by zero in E:\xampp\htdocs\t3.php on line 7 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66519&edit=1

« previous php.bugs (#183913) next »