Bug #73004 [Com]: PHP 5.6 Doesn't Read EXIF Location

From: Date: Fri, 25 Aug 2017 17:35:38 +0000
Subject: Bug #73004 [Com]: PHP 5.6 Doesn't Read EXIF Location
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210819@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73004&edit=1

 ID:                 73004
 Comment by:         alex at twbsd dot org
 Reported by:        tom_kincaid at hotmail dot com
 Summary:            PHP 5.6 Doesn't Read EXIF Location
 Status:             Feedback
 Type:               Bug
 Package:            EXIF related
 Operating System:   Centos 7
 PHP Version:        5.6.25
 Assigned To:        kalle
 Block user comment: N
 Private report:     N

 New Comment:

Here is 2 more files that doesn't work.
http://gofile.me/34nYu/veF3dVpoY
http://gofile.me/34nYu/etLhiFUFH

These pictures are token by using Canon 6D. It has built-in GPS.

You may find other Canon 6D pictures online:
http://web.canon.jp/imaging/eosd/samples/eos6d/downloads/01.jpg
https://www.flickr.com/photos/43728480@N07/11810674583/sizes/o/


Pictures took by iPhone 7 works well though.
Tried on PHP 7.1.8

Thank you for looking into this issue.


Previous Comments:
------------------------------------------------------------------------
[2017-08-25 13:48:57] kalle@php.net

Please supply me with any valid images so that I can further debug them. 

Also try PHP 7.2, which includes a large number of fixes to exif

------------------------------------------------------------------------
[2017-08-25 08:11:31] xiaolujih at yahoo dot com

I am having this issue: exif_read_data() does not return/extract any GPS location data. I have tried
with many valid JPGE image files. 

And my PHP info shows the versions with PHP and with the EXIF function I am using/running:

PHP information: PHP Version 5.2.17 
EXIF Support enabled
EXIF Version 1.4 $Id: exif.c 293036 2010-01-03 09:23:27Z sebastian $
Supported EXIF Version 0220
Supported filetypes JPEG,TIFF

Thanks!

------------------------------------------------------------------------
[2017-07-16 04:22:31] 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.

------------------------------------------------------------------------
[2017-07-07 10:31:14] kalle@php.net

Hi

Could you please re-upload the image? I believe that a recent bug fix I did to the EXIF extensionn
may have fixed this in the process and I need something to verify this.

Thanks!

------------------------------------------------------------------------
[2016-10-16 04:58:56] alex at twbsd dot org

Started from 5.6.24, exif can't read GPS location any more. It worked at 5.6.23.
But I tested 5.6.24~5.6.27 and 7.0.12 all won't work.


Test code:

#!/usr/local/bin/php
<?php
$e = exif_read_data("IMG_4017.JPG", 0,true,false);
var_dump($e['GPS']);


Remove the following code in exif.c, the GPS info can be read again:
=====
if (offset_diff < 0 || offset_diff >= value_len ) {
				exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING,
"IFD data bad offset: 0x%04X length 0x%04X", offset_diff, value_len);
				return FALSE;
			}
=====

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=73004


--
Edit this bug report at https://bugs.php.net/bug.php?id=73004&edit=1


Thread (12 messages)

« previous php.bugs (#210819) next »