ID: 22120 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: GetImageSize related Operating System: Linux 2.2.19 (Debian) PHP Version: 4.3.0 New Comment:
My apologies - it seems to work on bug2.jpg (the version loaded into GIMP and then resaved out.) Previous Comments: ------------------------------------------------------------------------ [2003-02-08 00:26:15] [EMAIL PROTECTED] GetImageSize() seems confused on certain JPGs from freeservers. The JPG is valid (you can load it from your web-browser). Script to reproduce: <? $res = GetImageSize("http://guildprime.8m.net/bug.jpg"); if($res == FALSE) { print("Erk! GetImageSize returned FALSE!"); } else { print_r($res); } print("<br><br>"); $res = GetImageSize("http://guildprime.8m.net/notbug.jpg"); if($res == FALSE) { print("Erk! GetImageSize returned FALSE!"); } else { print_r($res); } ?> The script SHOULD report: Array ( [0] => 396 [1] => 178 [2] => 2 [3] => width="396" height="178" [bits] => 8 [channels] => 3 ) Array ( [0] => 800 [1] => 600 [2] => 2 [3] => width="800" height="600" [bits] => 8 [channels] => 3 ) And it does when I copy the file to my local Apache web server and change the script to point there instead. It also works on a second server I have running PHP 4.1.2. However, with the URL listed, under PHP 4.3.0, it reports: Erk! GetImageSize returned FALSE! Array ( [0] => 800 [1] => 600 [2] => 2 [3] => width="800" height="600" [bits] => 8 [channels] => 3 [mime] => image/jpeg ) Configuration options: ./configure --with-apxs --with-zlib --with-bz2 --with-gd=/usr --enable-gd-native-ttf --with-mysql=/usr --enable-sockets --prefix=/usr --with-ttf --enable-ftp Troubleshooting steps already taken: - I tried copying the image to my local web server, changed the script to look there, and it works. - Dozens of other JPGs on freeservers work as well. - It seems this combination of server and image file is causing GetImageSize() to fail. When I point my web browser at the same URL, the picture comes up. - I tried putting the picture into GIMP and resaving out - the re-saved image also has the same problems. (This file is bug2.jpg at the same site.) - Running 'identify -verbose' on the files shows perhaps the difference of Resolution (notbug.jpg is 300x300 pixels/inch, as are most of the other pictures, while bug.jpg and bug2.jpg are at72x72 pixels/inch) may be part of what's triggering it. - I have re-downloaded the source, re-compiled and re-installed with the above options, with no change in results. - Running the script from the command line has no change in results. All-in-all, quite strange... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22120&edit=1