ID: 21912 Comment by: michael dot mauch at gmx dot de Reported By: tozz at kijkt dot tv Status: Verified Bug Type: GetImageSize related Operating System: Linux PHP Version: 4.3.1-dev New Comment:
Yes, it's the same here - on the local servers it works with both images, but it doesn't work with the 00645.jpg when I put it on another remote server. When I change line 387 of ext/standard/image.c: if ((marker = php_stream_getc(stream)) == EOF) into marker = php_stream_getc(stream); fprintf(stderr,"%0x ",marker); if (marker == EOF) I see e0 ff ed ff ee ff db ff c0 when the image is served from localhost and only e0 ff ed 68 or e0 ff ed 64 when fetching from the remote servers. That looks strange, but I'm afraid I don't understand what's going on here. Previous Comments: ------------------------------------------------------------------------ [2003-02-08 05:41:17] [EMAIL PROTECTED] I suppose ther is another problem :-) When i download the image and put it on one of my local servers it works: [marcus@zaphod php4-HEAD]$ php -r 'print_r(getimagesize($argv[1]));' -- http://zaphod.boerger.de/php/ext/exif/test/bug21912.jpg Array ( [0] => 389 [1] => 500 [2] => 2 [3] => width="389" height="500" [bits] => 8 [channels] => 3 [mime] => image/jpeg ) [marcus@zaphod php4-HEAD]$ php -r 'var_dump(getimagesize($argv[1]));' -- http://s005.pictura-dp.nl/foto/500px/GAM_017/00645.jpg bool(false) ------------------------------------------------------------------------ [2003-01-28 13:52:36] tozz at kijkt dot tv Yes, it has indeed something to do with the image. If I take another image it works fine! But there must be some difference in the PHP versions since the 2nd pictures only works with PHP 4.1.2, and not with the latest PHP version. ------------------------------------------------------------------------ [2003-01-28 13:26:00] michael dot mauch at gmx dot de php -r '$size = getimagesize("http://s005.pictura-dp.nl/foto/500px/GAM_908/08841.jpg"); print_r($size); echo "\n";' works without problems here (PHP 4.3.0), while php -r '$size = getimagesize("http://s005.pictura-dp.nl/foto/500px/GAM_017/00645.jpg"); print_r($size); echo "\n";' prints nothing. ImageMagick's "identify" sees some strange ipct data in the second image; probably these make getimagesize() misbehave. ------------------------------------------------------------------------ [2003-01-27 17:25:35] [EMAIL PROTECTED] I can reproduce this with latest stable CVS (4.3.1-dev) It does work if the image is local..but not if it's remote. ------------------------------------------------------------------------ [2003-01-27 16:12:37] tozz at kijkt dot tv Hallo, I have a weird problem, which I think is a bug. The following script works with PHP 4.1.2 (I know, very outdated), but DOES NOT work with PHP 4.3.0: <? error_reporting (E_ALL); $foto="http://s005.pictura-dp.nl/foto/500px/GAM_908/08841.jpg"; $image_size=getimagesize($foto); $width=$image_size[0]; $height=$image_size[1]; $type=$image_size[2]; print ("<img src='$foto'>\n"); print ("<p>\n"); print ("width: $width; height: $height; type: $type<br>\n"); print ("<p>\n"); $foto="http://s005.pictura-dp.nl/foto/500px/GAM_017/00645.jpg"; $image_size=getimagesize($foto); $width=$image_size[0]; $height=$image_size[1]; $type=$image_size[2]; print ("<img src='$foto'>\n"); print ("<p>\n"); print ("width: $width; height: $height; type: $type<br>\n"); ?> The problem is : The first image works fine, it shows the height, width and type. However, the information about the second image is only beeing displayed if using PHP 4.1.2. With PHP 4.3.0 no information is beeing displayed. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21912&edit=1