|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20560
Submitted: 2002-11-21 23:16 UTC Modified: 2005-02-01 23:02 UTC
From: play at slowchildren dot com Assigned:
Status: Closed Package: EXIF related
PHP Version: 4.3.0RC1 OS: FreeBSD/Pentium III
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: play at slowchildren dot com
New email:
PHP Version: OS:


 [2002-11-21 23:16 UTC] play at slowchildren dot com

script =-=-=-=-=-=-=-=-=
$exif = exif_read_data ('pictures/IMG_0454.JPG',0,true,false);
echo "IMG_0458.JPG:<br /><img src=thumb.php?file=pictures/IMG_0458.JPG /><br />\n";
foreach($exif as $key=>$section) {
    foreach($section as $name=>$val) {
        echo "$key.$name: $val<br />\n";
/script =-=-=-=-=-=-=-=-=

This script can't seem to find my JPEG comment.  Using jhead* or GraphicCoverter* shows my jpeg comment just find.  Why doesn't it work in php???


Here's the image:

Just in case:

 './configure' '--with-gd' '--without-msql' '--with-iodbc' '--with-curl' '--with-png-dir=/usr/local/lib' '--with-mysql=/usr/local' '--with-config-file-path=/usr/www/users/dant/scott/phpini' '--enable-debug=no' '--enable-track-vars=yes' '--enable-ftp=yes' '--enable-force-cgi-redirect=yes' '--enable-exif' '--enable-mbstring' '--enable-magic-quotes' '--enable-bcmath' '--with-zlib-dir=/usr/local'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-22 10:47 UTC] play at slowchildren dot com
Okay...I saw the 'Applemark' as well, but couldn't figure out what that means because 'Applemark' is not my comment.  Maybe I need to be more specific about which computer I ran jhead on.  Using the jhead 1.8 on MacOS X (with a freshly downloaded copy of the jpeg) I get this:

File name    : IMG_0458.JPG
File size    : 71678 bytes
File date    : 2002:11:21 23:54:20
Camera make  : Canon
Camera model : Canon PowerShot S200
Date/Time    : 2002:11:17 01:03:18
Resolution   : 480 x 640
Orientation  : rotate 270
Flash used   : No
Focal length :  5.4mm  (35mm equivalent: 37mm)
CCD width    : 5.23mm
Exposure time: 0.800 s 
Aperture     : f/2.8
Exposure bias:2.00
Metering Mode: matrix
Jpeg process : Baseline
Comment      : My roommate lookin' like a bad ass.

Is this a bug in jhead as well??  Is this a MacOS X thing??  What OS did you test jhead on??  I couldn't get jhead to compile on my webserver (

As I mentioned above, GraphicCoverter (a great graphics app for the mac) also shows the correct comment.  In fact, 'Applemark' doesn't show up anywhere on my Mac.  Could it be possible that you are running jhead on the thumbnail graphic??

Believe me, if I thought this was a support issue I wouldn't have submitted it as a bug, I don't want to waste anyone's time.  Please take another look.
 [2002-11-22 10:58 UTC]
You are correct I ran it on the thumbnail image assuming that was the complete image. On the full the image I do see the comment, however it does not appear to be stored in the correct location.
The comment appears inside element [0] of the array returned by exif_read_data.
 [2002-11-22 15:53 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Dec 05 14:05:52 2022 UTC