php.net |  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
 [2003-06-20 09:36 UTC] wuelle at digicol dot de
Description:
------------
Try to compute the size of an image. The picture with exif works with photoshop and with any browser. The picture is available at 'http://www.wuelle.de/20016707_2.jpg'.

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

Reproduce code:
---------------
<?php

$original = "20016707_2.jpg";

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

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

$result = GetImageSize($original);
print_r($result);

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 />



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-20 12:56 UTC] helly@php.net
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 http://www.php.net/support.php 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-2018 The PHP Group
All rights reserved.
Last updated: Mon Dec 17 00:01:26 2018 UTC