From: Heikki dot Vesanto at gmail dot com
Operating system: Ubuntu
PHP version: 7.2.0RC4
Package: EXIF related
Bug Type: Bug
Bug description:exif_read_data(image.jpg): corrupt EXIF header: maximum directory nesting
Description:
------------
Sounds similar to: https://bugs.php.net/bug.php?id=66443
php -v
PHP 7.2.0RC4 (cli) (built: Oct 22 2017 13:39:08) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.2.0RC4, Copyright (c) 1999-2017, by Zend
Technologies
Error I get:
PHP Warning: exif_read_data(12_Adventure_Duck.jpg): corrupt EXIF
header: maximum directory nesting level reached in
/var/www/maps.gisforthought.com/html/getphotos.php on line 16
You can find the image at:
https://maps.gisforthought.com/Photos/12_Adventure_Duck.jpg
I also have an image that does work on my setup:
https://maps.gisforthought.com/Photos/01_Adventure_Duck.jpg
EXIF as shown by the Linux exif terminal command:
EXIF tags in '12_Adventure_Duck.jpg' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag |Value
--------------------+----------------------------------------------------------
Manufacturer |Panasonic
Model |DMC-TZ40
X-Resolution |180
Y-Resolution |180
Resolution Unit |Inch
Software |Ver.1.2
Date and Time |2014:05:26 05:42:32
Artist |Picasa
YCbCr Positioning |Co-sited
PRINT Image Matching|208 bytes undefined data
Compression |JPEG compression
X-Resolution |72
Y-Resolution |72
Resolution Unit |Inch
Exposure Time |1/800 sec.
F-Number |f/3.3
Exposure Program |Normal program
ISO Speed Ratings |100
Exif Version |Exif Version 2.3
Date and Time (Origi|2014:05:26 05:42:32
Date and Time (Digit|2014:05:26 05:42:32
Components Configura|Y Cb Cr -
Compressed Bits per | 4
Exposure Bias |0.00 EV
Maximum Aperture Val|3.45 EV (f/3.3)
Metering Mode |Center-weighted average
Light Source |Unknown
Flash |Flash did not fire, compulsory flash mode
Focal Length |4.3 mm
Maker Note |3596 bytes undefined data
FlashPixVersion |FlashPix Version 1.0
Color Space |sRGB
Pixel X Dimension |1131
Pixel Y Dimension |848
Sensing Method |One-chip color area sensor
File Source |DSC
Scene Type |Directly photographed
Custom Rendered |Normal process
Exposure Mode |Auto exposure
White Balance |Auto white balance
Digital Zoom Ratio |0.0
Focal Length in 35mm|24
Scene Capture Type |Standard
Gain Control |Normal
Contrast |Normal
Saturation |Normal
Sharpness |Normal
Image Unique ID |1b5003f64a45bef4946ef7a95f8d18a6
GPS Tag Version |2.2.0.0
North or South Latit|N
Latitude |40, 27, 15.812
East or West Longitu|E
Longitude |116, 32, 10.7166
Altitude Reference |Sea level
Altitude |971.380
GPS Time (Atomic Clo|04:42:32.00
GPS Receiver Status |V
GPS Measurement Mode|2
Measurement Precisio|0.0
GPS Image Direction |M
GPS Image Direction |135
Geodetic Survey Data|WGS-84
Name of GPS Processi|14 bytes undefined data
Name of GPS Area |266 bytes undefined data
GPS Date |2014:05:26
Interoperability Ind|R98
Interoperability Ver|0100
RelatedImageWidth |4896
RelatedImageLength |3672
--------------------+----------------------------------------------------------
EXIF data contains a thumbnail (5865 bytes).
Test script:
---------------
<?php
$dir = "Photos";
$files = scandir($dir);
foreach($files as $file) {
$path = $dir . "/" . $file;
$exif = exif_read_data($path);
}
?>
Actual result:
--------------
PHP Warning: exif_read_data(12_Adventure_Duck.jpg): corrupt EXIF
header: maximum directory nesting level reached in
/var/www/maps.gisforthought.com/html/getphotos.php on line 16
--
Edit bug report at https://bugs.php.net/bug.php?id=75424&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75424&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75424&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75424&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75424&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75424&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75424&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75424&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75424&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75424&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75424&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75424&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75424&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75424&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75424&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75424&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75424&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75424&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75424&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75424&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75424&r=mysqlcfg