php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72772 EXIF data not read from jpeg
Submitted: 2016-08-06 23:07 UTC Modified: 2016-09-08 23:31 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:0 (0.0%)
From: clive at indx dot co dot uk Assigned:
Status: Closed Package: EXIF related
PHP Version: 5.6.24 OS: Linux web25 4.4.10-20160518-1030
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: clive at indx dot co dot uk
New email:
PHP Version: OS:

 

 [2016-08-06 23:07 UTC] clive at indx dot co dot uk
Description:
------------
Linux web25 4.4.10-20160518-1030-f317965 #1 SMP Wed May 18 10:33:23 UTC 2016 x86_64

phpinfo() output attached.

using "exif_read_data('file')" fails to read data from jpeg files.

Code has worked in previous versions.

Also checked image online at http://exifdata.com/exif.php, shows EXIF data without issues.


Test script:
---------------
<?php

$exif = exif_read_data( './2014-09-23-5981.jpg' ) ;
 
foreach ($exif as $mykey => $mysection) {
 foreach ($mysection as $myname => $myval) {
   echo "$mykey.$myname: $myval<br />\n";
   }
 }
						
?>

archive of example file and .jpeg here: http://www.indx.co.uk/phpexif.zip

Expected result:
----------------
Expected entire EXIF data, just got "COMPUTED" outputs.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-07 03:38 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2016-08-07 03:38 UTC] kalle@php.net
Could you please confirm if this happens with the release of PHP 7.0.10 where a regression was recently fixed? I don't think it was merged to 5.6, but it would great if you could confirm that it works there
 [2016-08-14 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2016-08-23 14:26 UTC] clive at indx dot co dot uk
-Status: No Feedback +Status: Closed
 [2016-08-23 14:26 UTC] clive at indx dot co dot uk
Sorry, I can't test with 7.10 - I've tried building it on my own systems but without success. My hosting provider offers 7.0.9, and this shows the same issues as I've noted with the 5.6.24 bug I've reported.

An update to this is that if I open an image with Photoshop, take out the EXIF information that I don't need (I only need the GPS-related data) then save, the GPS data is read ok. So it appears that it's an EXIF format issue, or some field that exif_read_data cannot parse.

However, this isn't a solution for me, as I have over 12,000 images.
 [2016-08-23 14:27 UTC] clive at indx dot co dot uk
-Status: Closed +Status: Assigned
 [2016-08-23 14:27 UTC] clive at indx dot co dot uk
Won't let me re-open the bug.
 [2016-08-23 14:29 UTC] clive at indx dot co dot uk
-Status: Assigned +Status: Open
 [2016-08-23 14:29 UTC] clive at indx dot co dot uk
Now I can "open"?
 [2016-09-08 22:52 UTC] clive at indx dot co dot uk
I have now had the opportunity to test for this bug on 7.0.10 - it is no longer present in that build. Would be great if you could merge this fix into the 5.6 builds. Thanks.
 [2016-09-08 23:31 UTC] clive at indx dot co dot uk
-Status: Open +Status: Closed
 [2016-09-08 23:31 UTC] clive at indx dot co dot uk
Have now also had the opportunity to test with 5.6.25, Which also fixes the bug. Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC