|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24268 GetImageSize and read_exif_data Problem
Submitted: 2003-06-20 09:36 UTC Modified: 2005-02-01 23:00 UTC
From: wuelle at digicol dot de Assigned: helly (profile)
Status: Not a bug Package: EXIF related
PHP Version: 4.3.2 OS: ANY
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: wuelle at digicol dot de
New email:
PHP Version: OS:


 [2003-06-20 09:36 UTC] wuelle at digicol dot de
Try to compute the size of an image. The picture with exif works with photoshop and with any browser. The picture is available at ''.

I don't know what the problem is -  Is this an invalid JPEG file or a php prblem ?

Reproduce code:

$original = "20016707_2.jpg";

echo "exif type : ". exif_imagetype($original) ."\n";

$exif = read_exif_data ($original);
  echo "$k: $v<br>\n";

$result = GetImageSize($original);

echo "\nready\n";


Expected result:
Information about the picture.

Actual result:
Content-type: text/html
X-Powered-By: PHP/4.3.2

exif type : 2
<br />
<b>Warning</b>:  read_exif_data(20016707_2.jpg): process tag(x927C=MakerNote  ): Illegal pointer offset(x02CA &lt; x81A5203) in <b>/dot/dcl/digidcl/manni/fehler_pic/wuelle.php3</b> on line <b>7</b><br />
<br />
<b>Warning</b>:  read_exif_data(): File structure corrupted in <b>/dot/dcl/digidcl/manni/fehler_pic/wuelle.php3</b> on line <b>7</b><br />
<br />
<b>Warning</b>:  read_exif_data(20016707_2.jpg): invalid JPEG file in <b>/dot/dcl/digidcl/manni/fehler_pic/wuelle.php3</b> on line <b>7</b><br />
<br />
<b>Warning</b>:  Variable passed to each() is not an array or object in <b>/dot/dcl/digidcl/manni/fehler_pic/wuelle.php3</b> on line <b>8</b><br />


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-20 12:56 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

I looked at your file in detail and found out that it was damaged by meta info editing. Which programs did you use?

This is nothing to really worry about because meanwhile many programs have workarounds for programs that damage images in the way done to your image. Even PHP has some workarounds in that area. Anyway every additonal workaround makes the code harder to maintain and less robust.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Jun 26 01:03:36 2022 UTC