From: skinny dot bravo at gmail dot com Operating system: Linux PHP version: 5.2.12 PHP Bug Type: EXIF related Bug description: exif_read_data fails on a given image while giving no errors with other tools
Description: ------------ PHP fails reading GPS data from a given set of photos from Samsung SGH- i900. The images are said to come from the camera without any edits. Ex: http://o1.imgsrc.ru/v/vahmurka/3/16095163cDU.jpg http://o1.imgsrc.ru/v/vahmurka/1/16095161rno.jpg exiftool 8.00 has no problem reading this file. php5.2-201001041530 produces the same result. Reproduce code: --------------- # php -r 'var_dump(read_exif_data("16095163cDU.jpg",NULL,TRUE));' Expected result: ---------------- ... ["SectionsFound"]=> string(35) "ANY_TAG, IFD0, THUMBNAIL, EXIF, GPS" ... ["GPS"]=> array(8) { ["GPSVersion"]=> string(4) "" ["GPSLatitudeRef"]=> string(1) "N" ["GPSLatitude"]=> array(3) { [0]=> string(4) "43/1" [1]=> string(4) "16/1" [2]=> string(11) "75363/10000" } ["GPSLongitudeRef"]=> string(1) "E" ["GPSLongitude"]=> array(3) { [0]=> string(4) "77/1" [1]=> string(4) "21/1" [2]=> string(11) "140249/2629" } ["GPSAltitudeRef"]=> string(1) "" ["GPSAltitude"]=> string(6) "1603/1" ["GPSMapDatum"]=> string(6) "WGS-84" } these results are taken after fixing image with exiftool: # exiftool -all= -tagsfromfile @ -all:all -unsafe 16095163cDU.jpg Actual result: -------------- Warning: read_exif_data(16095163cDU.jpg): Illegal IFD offset in Command line code on line 1 array(4) { ["FILE"]=> array(6) { ["FileName"]=> string(15) "16095163cDU.jpg" ["FileDateTime"]=> int(1259257839) ["FileSize"]=> int(938692) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(19) "ANY_TAG, IFD0, EXIF" } -- Edit bug report at http://bugs.php.net/?id=50660&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50660&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50660&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50660&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50660&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50660&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50660&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50660&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50660&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50660&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50660&r=support Expected behavior: http://bugs.php.net/fix.php?id=50660&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50660&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50660&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50660&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50660&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50660&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50660&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50660&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50660&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50660&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50660&r=mysqlcfg