Bug #73004 [NoF->Fbk]: PHP 5.6 Doesn't Read EXIF Location

From: Date: Fri, 25 Aug 2017 13:49:01 +0000
Subject: Bug #73004 [NoF->Fbk]: PHP 5.6 Doesn't Read EXIF Location
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210808@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
 Updated by:         kalle@php.net
 Reported by:        tom_kincaid at hotmail dot com
 Summary:            PHP 5.6 Doesn't Read EXIF Location
-Status:             No Feedback
+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:

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


Previous Comments:
------------------------------------------------------------------------
[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;
			}
=====

------------------------------------------------------------------------
[2016-09-14 21:23:01] dotpointer at gmail dot com

I'm running Debian 8.5 and the Debian (apt-get) supplied version: PHP 5.6.24-0+deb8u1.

I have also this bug - exif_read_data() has stopped outputting GPS tags in my case.

I guess it has todo with the security fix recently applied, noted here:
http://stackoverflow.com/questions/38772471/php-exif-read-data-no-longer-extracts-gps-location

I understand that security fixes are crucial, but don't know how this regression in
functionality could have reached production level as I'm running an updated standard Debian
installation and not testing. 

GPS reading implementations in PHP are probably breaking all around the planet right now. I hope
this will be fixed soon for 5.6+ too.

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


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 (#210808) next »