Bug 1362571 - php-5.6.24-2.fc24.x86_64 not returning full results for exif_read_data function
Summary: php-5.6.24-2.fc24.x86_64 not returning full results for exif_read_data function
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: php
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Remi Collet
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-02 14:24 UTC by Michael
Modified: 2016-09-10 05:21 UTC (History)
4 users (show)

Fixed In Version: php-5.6.25-1.fc24 php-5.6.25-1.fc23
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-04 00:52:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Example photo with EXIF data (3.42 MB, image/jpeg)
2016-08-02 23:38 UTC, Michael
no flags Details
Panasonic.jpg (16.24 KB, image/jpeg)
2016-08-03 05:12 UTC, Remi Collet
no flags Details


Links
System ID Private Priority Status Summary Last Updated
PHP Bug Tracker 72735 0 None None None 2016-08-03 05:12:55 UTC

Description Michael 2016-08-02 14:24:27 UTC
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:

Comment 1 Remi Collet 2016-08-02 14:41:57 UTC
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).

Comment 2 Michael 2016-08-02 23:38:28 UTC
Created attachment 1186911 [details]
Example photo with EXIF data

Comment 3 Michael 2016-08-02 23:42:20 UTC
(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.

Comment 4 Remi Collet 2016-08-03 05:12:20 UTC
Created attachment 1186936 [details]
Panasonic.jpg

Image minimized (enough for test)

Comment 5 Remi Collet 2016-08-03 05:12:55 UTC
Upstream bug tracker: https://bugs.php.net/72735

Comment 6 Remi Collet 2016-08-03 12:48:11 UTC
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)

Comment 7 Kalle Sommer Nielsen 2016-08-04 00:14:29 UTC
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!

Comment 8 Remi Collet 2016-08-04 06:39:08 UTC
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)

Comment 9 Fedora Update System 2016-08-04 09:45:44 UTC
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

Comment 10 Fedora Update System 2016-08-04 09:45:51 UTC
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

Comment 11 Fedora Update System 2016-08-04 23:51:17 UTC
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

Comment 12 Fedora Update System 2016-08-04 23:52:24 UTC
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

Comment 13 Michael 2016-08-17 03:44:31 UTC
This update appears to resolve the reported bug.

Comment 14 Michael 2016-08-18 01:48:42 UTC
When will this be released for GA? I've lost the ability to rollback, leaving the system unusable.

Comment 15 Joe Orton 2016-08-18 07:47:06 UTC
5.6.25 is due to be released today. Remi's away, but I should be able to push that when it's out.

Comment 17 Joe Orton 2016-08-24 09:21:36 UTC
Package: php-5.6.25-1.fc24
Build: https://koji.fedoraproject.org/koji/buildinfo?buildID=794119

Comment 18 Fedora Update System 2016-08-24 10:00:59 UTC
php-5.6.25-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-16b577cdef

Comment 19 Fedora Update System 2016-08-25 10:32:10 UTC
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

Comment 20 Fedora Update System 2016-08-30 09:04:50 UTC
php-5.6.25-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-22e6229e5a

Comment 21 Fedora Update System 2016-08-31 12:59:06 UTC
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

Comment 22 Fedora Update System 2016-09-04 00:52:14 UTC
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.

Comment 23 Fedora Update System 2016-09-10 05:21:12 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.