Description of problem: After updating to PHP version 5.6.24-2.fc24.x86_64, results of the function exif_read_data were incomplete. There are a number of EXIF data sections missing from the resultant data, including thumbnail and GPS. Applications relying on this data experience fatal errors when the data is not returned. Downgrading to 5.6.22-1.fc24.x86_64 resolved the issue for the time being. Version-Release number of selected component (if applicable): 5.6.24-2.fc24.x86_64 How reproducible: Constant Steps to Reproduce: 1. Using a photo from a smartphone as an example run the following code on version 5.6.22-1.fc24.x86_64 and 5.6.24-2.fc24.x86_64 to compare the difference in function output: <?php print_r(exif_read_data("/path/to/jpeg/file.jpeg", 0, true)); ?> Actual results: Array ( [FileName] => P1010200.JPG [FileDateTime] => 1304816842 [FileSize] => 3588412 [FileType] => 2 [MimeType] => image/jpeg [SectionsFound] => ANY_TAG, IFD0, EXIF [COMPUTED] => Array ( [html] => width="3264" height="2448" [Height] => 2448 [Width] => 3264 [IsColor] => 1 [ByteOrderMotorola] => 0 [ApertureFNumber] => f/4.6 ) [Make] => Panasonic [Model] => DMC-TZ10 [Orientation] => 1 [XResolution] => 180/1 [YResolution] => 180/1 [ResolutionUnit] => 2 [Software] => Ver.1.2 [DateTime] => 2011:05:08 11:07:23 [YCbCrPositioning] => 2 [ExposureTime] => 10/3200 [FNumber] => 46/10 [ExposureProgram] => 2 [ISOSpeedRatings] => 125 [ExifVersion] => 0221 [DateTimeOriginal] => 2011:05:08 11:07:23 [DateTimeDigitized] => 2011:05:08 11:07:23 [ComponentsConfiguration] => [CompressedBitsPerPixel] => 4/1 [ExposureBiasValue] => 0/100 [MaxApertureValue] => 344/100 [MeteringMode] => 5 [LightSource] => 0 [Flash] => 16 [FocalLength] => 370/10 ) Expected results: Array ( [FileName] => P1010200.JPG [FileDateTime] => 1304816842 [FileSize] => 3588412 [FileType] => 2 [MimeType] => image/jpeg [SectionsFound] => ANY_TAG, IFD0, THUMBNAIL, EXIF, GPS, INTEROP [COMPUTED] => Array ( [html] => width="3264" height="2448" [Height] => 2448 [Width] => 3264 [IsColor] => 1 [ByteOrderMotorola] => 0 [ApertureFNumber] => f/4.6 [Thumbnail.FileType] => 2 [Thumbnail.MimeType] => image/jpeg ) [Make] => Panasonic [Model] => DMC-TZ10 [Orientation] => 1 [XResolution] => 180/1 [YResolution] => 180/1 [ResolutionUnit] => 2 [Software] => Ver.1.2 [DateTime] => 2011:05:08 11:07:23 [YCbCrPositioning] => 2 [Exif_IFD_Pointer] => 654 [GPS_IFD_Pointer] => 11252 [THUMBNAIL] => Array ( [Compression] => 6 [Orientation] => 1 [XResolution] => 180/1 [YResolution] => 180/1 [ResolutionUnit] => 2 [JPEGInterchangeFormat] => 11764 [JPEGInterchangeFormatLength] => 5541 [YCbCrPositioning] => 2 ) [ExposureTime] => 10/3200 [FNumber] => 46/10 [ExposureProgram] => 2 [ISOSpeedRatings] => 125 [ExifVersion] => 0221 [DateTimeOriginal] => 2011:05:08 11:07:23 [DateTimeDigitized] => 2011:05:08 11:07:23 [ComponentsConfiguration] => [CompressedBitsPerPixel] => 4/1 [ExposureBiasValue] => 0/100 [MaxApertureValue] => 344/100 [MeteringMode] => 5 [LightSource] => 0 [Flash] => 16 [FocalLength] => 370/10 [MakerNote] => Panasonic [FlashPixVersion] => 0100 [ColorSpace] => 1 [ExifImageWidth] => 3264 [ExifImageLength] => 2448 [InteroperabilityOffset] => 11516 [SensingMethod] => 2 [FileSource] => [SceneType] => [CustomRendered] => 0 [ExposureMode] => 0 [WhiteBalance] => 0 [DigitalZoomRatio] => 0/10 [FocalLengthIn35mmFilm] => 225 [SceneCaptureType] => 0 [GainControl] => 1 [Contrast] => 0 [Saturation] => 0 [Sharpness] => 0 [GPSVersion] => [GPSLatitudeRef] => N [GPSLatitude] => Array ( [0] => 57/1 [1] => 16/1 [2] => 4039/100 ) [GPSLongitudeRef] => W [GPSLongitude] => Array ( [0] => 5/1 [1] => 31/1 [2] => 1145/100 ) [GPSTimeStamp] => Array ( [0] => 11/1 [1] => 5/1 [2] => 50/1 ) [GPSSatellites] => 4 [GPSStatus] => A [GPSMeasureMode] => 2 [GPSDOP] => 46/10 [GPSMapDatum] => WGS-84 [GPSProcessingMode] => GPS [GPSDateStamp] => 2011:05:08 [InterOperabilityIndex] => R98 [InterOperabilityVersion] => 0100 ) Additional info:
Can you please upload a sample image so I can try this. BTW there is some security fix in exif extension, seems to be a side effect (regression).
Created attachment 1186911 [details] Example photo with EXIF data
(In reply to Remi Collet from comment #1) > Can you please upload a sample image so I can try this. > > BTW there is some security fix in exif extension, seems to be a side effect > (regression). Remi, an example image has been attached to the ticket.
Created attachment 1186936 [details] Panasonic.jpg Image minimized (enough for test)
Upstream bug tracker: https://bugs.php.net/72735
We are working hard on this regression (to be part of 5.6.25/7.0.10) 2 ways: - fix the regression by providing a fallback code for unknown manufacturer (in MakerNote) - add more manufacturer data (for now, Samsung and Panasonic)
I fixed the bug upstream, should be in the 7.x branches now. I'm not sure if this went into the 5.6 branch yet. Side note; the recent EXIF fixes also adds support for Samsung, DJI, Panasonic and I plan to look into some of the Sony stuff. Thanks for helping to make PHP even greater!
The fix will be part of next PHP versions (5.6.25, 7.0.10) $ php -v PHP 5.6.25RC1 (cli) (built: Aug 4 2016 06:31:18) $ php -r 'print_r(exif_read_data("P1010200.JPG"));' Array ( [FileName] => P1010200.JPG [FileDateTime] => 1470199563 ... [FocalLength] => 370/10 [MakerNote] => Panasonic [FlashPixVersion] => 0100 ... [GPSMapDatum] => WGS-84 [GPSProcessingMode] => GPS [GPSDateStamp] => 2011:05:08 [InterOperabilityIndex] => R98 [InterOperabilityVersion] => 0100 ) Version 5.6.25RC1 will be soon in updates-testing (and will stay there until 5.6.25 release)
php-5.6.25-0.1.RC1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-16b577cdef
php-5.6.25-0.1.RC1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-22e6229e5a
php-5.6.25-0.1.RC1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-16b577cdef
php-5.6.25-0.1.RC1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-22e6229e5a
This update appears to resolve the reported bug.
When will this be released for GA? I've lost the ability to rollback, leaving the system unusable.
5.6.25 is due to be released today. Remi's away, but I should be able to push that when it's out.
Commit: http://pkgs.fedoraproject.org/gitweb/?p=php.git;a=commitdiff;h=db59491bfffc0937361588553e5a07a5ad5f6d86
Package: php-5.6.25-1.fc24 Build: https://koji.fedoraproject.org/koji/buildinfo?buildID=794119
php-5.6.25-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-16b577cdef
php-5.6.25-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-16b577cdef
php-5.6.25-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-22e6229e5a
php-5.6.25-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-22e6229e5a
php-5.6.25-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
php-5.6.25-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.