php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77142 exif_read_data
Submitted: 2018-11-12 18:06 UTC Modified: 2020-03-22 04:22 UTC
Votes:11
Avg. Score:4.5 ± 0.7
Reproduced:11 of 11 (100.0%)
Same Version:5 (45.5%)
Same OS:6 (54.5%)
From: alerinpoland at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: EXIF related
PHP Version: 7.2.12 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
27 + 39 = ?
Subscribe to this entry?

 
 [2018-11-12 18:06 UTC] alerinpoland at gmail dot com
Description:
------------
Hello,
There is a problem with the exif_read_data function with photos from huwaei p20.
GPS location does not work
Warning: exif_read_data (IMG_20181112_151619.jpg): Process tag (x010D = DocumentNam): Illegal components (0) in /home/www/test.php on line 11

Test script:
---------------
exif_read_data('IMG_20181112_151619.jpg', 'EXIF', true);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-12 18:12 UTC] alerinpoland at gmail dot com
File:
https://www111.zippyshare.com/v/E3xIm8ju/file.html
View:
https://www.pic2map.com/lfays.html
 [2018-11-12 18:27 UTC] cmb@php.net
-Package: Unknown/Other Function +Package: EXIF related
 [2018-11-20 08:39 UTC] gunnar dot sakariassen at impreso dot no
I have the same problem. Seems that the EXIF array from the image taken with Huawei model RNE-L21 breaks or gets corrupted. No GPS data is present. I can see the location of the image in windows, so I know it is there. Works with Samsung images on same script. Error: Process tag (x010D = DocumentNam): Illegal components (0)
 [2018-12-23 08:35 UTC] tedferenc at hotmail dot com
Fails on Linux PHP version 7.2.11 and 7.2.10. On 7.2.10 exif_read_data gives this error "corrupt EXIF header: maximum directory nesting level reached" on 7.2.11 that error does not exist but still no GPS data, exiftool does display it camera is Panasonic DMC-TZ70
 [2018-12-26 08:03 UTC] tedferenc at hotmail dot com
Also fails on Linux 7.2.13
 [2019-01-16 10:34 UTC] server at masa10 dot info
I also faced the same problem.
As a result of examining this bug, I found out that there is a problem with Exif of the Huawei product.
The problem lies in the datatype of the Document Name field of Exif.
Whereas Exif standard requires ASCII type, Huawei product writes with UNDEFINED type, so an error occurs.
Therefore, we forcibly change the data type of DocumentName item from ASCII to UNDEFINED with Exif data editing software.
By doing so, even PHP7.2/7.3 can successfully read Exif of Huawei product.
This issue has already been reported to Huawei.
 [2019-03-24 19:01 UTC] kalle@php.net
-Status: Open +Status: Feedback
 [2019-03-24 19:01 UTC] kalle@php.net
Could you please re-upload the file somewhere?
 [2019-03-25 08:21 UTC] cmb@php.net
-Status: Feedback +Status: Open
 [2020-03-10 09:28 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-03-10 09:28 UTC] cmb@php.net
Works for me.  Can anybody still reproduce this issue with any of
the actively supported PHP versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2020-03-22 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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 18:02:40 2024 UTC