Debian Bug report logs - #853879
php5: exif_thumbnail fails on some valid jpg files

version graph

Package: php5; Maintainer for php5 is (unknown);

Reported by: Pirity Tamas Gabor <ptg@apaczai.elte.hu>

Date: Wed, 1 Feb 2017 18:48:05 UTC

Severity: normal

Found in version 5.4.45-0+deb7u6

Done: Ondřej Surý <ondrej@sury.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#853879; Package php5. (Wed, 01 Feb 2017 18:48:07 GMT) (full text, mbox, link).


Acknowledgement sent to Pirity Tamas Gabor <ptg@apaczai.elte.hu>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Wed, 01 Feb 2017 18:48:07 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Pirity Tamas Gabor <ptg@apaczai.elte.hu>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: php5: exif_thumbnail fails on some valid jpg files
Date: Wed, 1 Feb 2017 19:10:06 +0100
Package: php5
Version: 5.4.45-0+deb7u6
Severity: normal

Dear Maintainer,

-- System Information:
Debian Release: 7.11
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=hu_HU.utf8, LC_CTYPE=hu_HU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages php5 depends on:
ii  libapache2-mod-php5  5.4.45-0+deb7u6
ii  php5-cgi             5.4.45-0+deb7u6
ii  php5-common          5.4.45-0+deb7u6
-- no debconf information

I work on a gallery on my personal homepage, and want to get thumbnails
from the pictures with php_thumbnail() function. This works on some
jpg files, but doesn't work on others. The working and failing files
are correct, contain 160x120 thumbnail.

The script:

$ cat ttt.php
<?php
$file=$argv[1];
if (file_exists($file))
{
  if (exif_imagetype($file)==IMAGETYPE_JPEG)
  {
    $image=exif_thumbnail($file, $width, $height, $type);
    #header('Content-type: '.image_type_to_mime_type($type));
    #echo $image;
    printf("%d\n%d\n%d\n", $width, $height, $type);
  }
}
?>
$ php ttt.php 20150901_092323.jpg
0
0
0
$ php ttt.php 20100922_094342.jpg
160
120
2
$

Both files are valid jpg pictures, with 160x120 thumbnail, as exiv2 shows
and extract the thumbnail from both.

$ exiv2 20150901_092323.jpg 20100922_094342.jpg |grep Thumb
20150901_092323.jpg  Thumbnail       : image/jpeg, 5667 Bytes
20100922_094342.jpg  Thumbnail       : image/jpeg, 8978 Bytes

The script works on jessia-based machines, and i try two fresh wheezy-based
machines, neither works.

Relevant files are here: http://ptg.apaczai.elte.hu/php-bug

Sincerelly,

Pirity Tamás
-- 
PTG



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#853879; Package php5. (Wed, 01 Feb 2017 21:30:07 GMT) (full text, mbox, link).


Acknowledgement sent to Ondřej Surý <ondrej@sury.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Wed, 01 Feb 2017 21:30:07 GMT) (full text, mbox, link).


Message #10 received at 853879@bugs.debian.org (full text, mbox, reply):

From: Ondřej Surý <ondrej@sury.org>
To: Pirity Tamas Gabor <ptg@apaczai.elte.hu>, 853879@bugs.debian.org
Subject: Re: [php-maint] Bug#853879: php5: exif_thumbnail fails on some valid jpg files
Date: Wed, 01 Feb 2017 22:27:42 +0100
Control: close -1

Hi Pirity,

you are using a PHP version from Debian LTS distribution. The updates to
the software in Debian LTS are limited only to serious security
vulnerabilities and not the functional bugs like this. I am closing the
bug as it won't be ever fixed here. (Also PHP 5.4.x has reached
end-of-life in 2015, so it won't get any updates from upstream PHP.

You are invited to upgrade to current Debian stable that has latest PHP
5.6.x.

Cheers,
-- 
Ondřej Surý <ondrej@sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
Knot Resolver (https://www.knot-resolver.cz/) – secure, privacy-aware,
fast DNS(SEC) resolver
Vše pro chleba (https://vseprochleba.cz) – Mouky ze mlýna a potřeby pro
pečení chleba všeho druhu

On Wed, Feb 1, 2017, at 19:10, Pirity Tamas Gabor wrote:
> Package: php5
> Version: 5.4.45-0+deb7u6
> Severity: normal
> 
> Dear Maintainer,
> 
> -- System Information:
> Debian Release: 7.11
>   APT prefers oldstable-updates
>   APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
> Architecture: amd64 (x86_64)
> 
> Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
> Locale: LANG=hu_HU.utf8, LC_CTYPE=hu_HU.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages php5 depends on:
> ii  libapache2-mod-php5  5.4.45-0+deb7u6
> ii  php5-cgi             5.4.45-0+deb7u6
> ii  php5-common          5.4.45-0+deb7u6
> -- no debconf information
> 
> I work on a gallery on my personal homepage, and want to get thumbnails
> from the pictures with php_thumbnail() function. This works on some
> jpg files, but doesn't work on others. The working and failing files
> are correct, contain 160x120 thumbnail.
> 
> The script:
> 
> $ cat ttt.php
> <?php
> $file=$argv[1];
> if (file_exists($file))
> {
>   if (exif_imagetype($file)==IMAGETYPE_JPEG)
>   {
>     $image=exif_thumbnail($file, $width, $height, $type);
>     #header('Content-type: '.image_type_to_mime_type($type));
>     #echo $image;
>     printf("%d\n%d\n%d\n", $width, $height, $type);
>   }
> }
> ?>
> $ php ttt.php 20150901_092323.jpg
> 0
> 0
> 0
> $ php ttt.php 20100922_094342.jpg
> 160
> 120
> 2
> $
> 
> Both files are valid jpg pictures, with 160x120 thumbnail, as exiv2 shows
> and extract the thumbnail from both.
> 
> $ exiv2 20150901_092323.jpg 20100922_094342.jpg |grep Thumb
> 20150901_092323.jpg  Thumbnail       : image/jpeg, 5667 Bytes
> 20100922_094342.jpg  Thumbnail       : image/jpeg, 8978 Bytes
> 
> The script works on jessia-based machines, and i try two fresh
> wheezy-based
> machines, neither works.
> 
> Relevant files are here: http://ptg.apaczai.elte.hu/php-bug
> 
> Sincerelly,
> 
> Pirity Tamás
> -- 
> PTG
> 
> _______________________________________________
> pkg-php-maint mailing list
> pkg-php-maint@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-php-maint



Marked Bug as done Request was from Ondřej Surý <ondrej@sury.org> to 853879-submit@bugs.debian.org. (Wed, 01 Feb 2017 21:30:07 GMT) (full text, mbox, link).


Notification sent to Pirity Tamas Gabor <ptg@apaczai.elte.hu>:
Bug acknowledged by developer. (Wed, 01 Feb 2017 21:30:08 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 02 Mar 2017 07:33:52 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 03:31:14 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.