Bug #72278 [NEW]: getimagesize returning FALSE on valid jpg
From: bfarber at invisiopower dot com
Operating system: AWS / Windows
PHP version: 5.6.22
Package: GetImageSize related
Bug Type: Bug
Bug description:getimagesize returning FALSE on valid jpg
Description:
------------
The documentation for getimagesize() indicates the function returns
FALSE on failure, so the function is behaving as described, however I
cannot find any reason getimagesize() should be failing to parse this
particular image. A client has supplied a valid jpeg image and I can
read the EXIF data from it with a standalone parser, but getimagesize()
fails to parse it.
We have tested on multiple versions and have seen the same behavior on
all environments we've tested on. I have not tested PHP7 yet. I have
tested on Amazon's hosting environment, as well as my local WAMP stack.
http://bfarber.com/getimagesize_test/test.php
Image can be found here: http://bfarber.com/getimagesize_test/image.jpg
Test script:
---------------
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
print "PHP version is " . PHP_VERSION . "<br>";
var_dump( getimagesize('image.jpg') );
exit;
Expected result:
----------------
I should see an array output with the image width, height, etc.
Actual result:
--------------
boolean false is returned
--
Edit bug report at https://bugs.php.net/bug.php?id=72278&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72278&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72278&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72278&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72278&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72278&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72278&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72278&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72278&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72278&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72278&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72278&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72278&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72278&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72278&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72278&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72278&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72278&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72278&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72278&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72278&r=mysqlcfg
Thread (9 messages)
- bfarber at invisiopower dot com