Bug #75785 [PATCH]: Many errors from exif_read_data

From: Date: Sun, 12 Jul 2020 20:28:49 +0000
Subject: Bug #75785 [PATCH]: Many errors from exif_read_data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227980@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75785&edit=1 ID: 75785 Patch added by: nawarian@gmail.com Reported by: opajaap at opajaap dot nl Summary: Many errors from exif_read_data Status: Assigned Type: Bug Package: EXIF related Operating System: unknown PHP Version: 7.2.1 Assigned To: kalle Block user comment: N Private report: N New Comment: The following pull request has been associated: Patch Name: Fix Bug #75785: Add extra check for Maker's Note endianness On GitHub: https://github.com/php/php-src/pull/5849 Patch: https://github.com/php/php-src/pull/5849.patch Previous Comments: ------------------------------------------------------------------------ [2019-07-09 17:51:08] richard at dpiworld dot com exif_thumbnail() fails with PHP 7.2.20 on CentOS 7. Works fine with same images with PHP 5.6.40. ------------------------------------------------------------------------ [2019-01-22 01:48:26] richard at dpiworld dot com Same issue using 7.2.14 on CentOS 7. Code and images work fine with PHP 5.4.16 but with PHP 7.2.14 exif text output is truncated so can't get GPS data. Can't extract thumbnails with exif_thumbnail(). These things are critical for my application and will delay moving to PHP 7. EXEC exiftool is slow. FYI, the vote system here gets an HTTP 500 error and fails. ------------------------------------------------------------------------ [2018-10-23 09:45:43] mike dot blomgren at tornado dot se exif_read_data does not read all EXIF information in certain JPEG files. Sample JPG here, that has the problem: https://www.tornado.se/piwigo/tools/sample.jpg Using exif_read_data produces the following output of 'sample.jpg': https://www.tornado.se/piwigo/tools/metadata.php I.e. it is not complete (using print_r and var_dump). The apache server produces the followong errors in error_log: [Tue Oct 23 11:38:47.425214 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP Warning: read_exif_data(sample.jpg): Process tag(x010D=DocumentNam): Illegal components(0) in /var/wwwtornado/htdocs/piwigo/tools/metadata.php on line 93 [Tue Oct 23 11:38:47.425234 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP Stack trace: [Tue Oct 23 11:38:47.425240 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP 1. {main}() /var/wwwtornado/htdocs/piwigo/tools/metadata.php:0 [Tue Oct 23 11:38:47.425243 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP 2. read_exif_data() /var/wwwtornado/htdocs/piwigo/tools/metadata.php:93 [Tue Oct 23 11:38:47.425353 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP Notice: Undefined index: IFD0 in /var/wwwtornado/htdocs/piwigo/tools/metadata.php on line 110 [Tue Oct 23 11:38:47.425364 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP Stack trace: [Tue Oct 23 11:38:47.425370 2018] [php7:notice] [pid 3514] [client 195.198.34.135:1104] PHP 1. {main}() /var/wwwtornado/htdocs/piwigo/tools/metadata.php:0 Using exif_read_data seems to 'cut' up to a certain point of the EXIF header. Specifically I want to extract the DateTimeOriginal value, but php 7.2.11 isn't able to find the value. Using jhead or exiftool fully decodes all the EXIF headers. ------------------------------------------------------------------------ [2018-10-17 22:08:54] gino0631 at centaurus dot cloud It seems this issue is still present in PHP 7.2.11, e.g. with the sample image provided in this comment: https://github.com/gino0631/nextcloud-metadata/issues/19#issuecomment-414079570 ------------------------------------------------------------------------ [2018-07-25 07:24:28] jbe at geo6 dot be I have the same issue since a few days. Here is my PHP version : PHP 7.2.7-2+0~20180714182401.1+jessie~1.gbp3fcba8 (cli) (built: Jul 15 2018 13:57:20) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.7-2+0~20180714182401.1+jessie~1.gbp3fcba8, Copyright (c) 1999-2018, by Zend Technologies ------------------------------------------------------------------------ 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=75785 -- Edit this bug report at https://bugs.php.net/bug.php?id=75785&edit=1

« previous php.bugs (#227980) next »