|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24612 getimagesize('test.jpg', $info) fails (only when 2nd parameter is used)
Submitted: 2003-07-11 15:33 UTC Modified: 2003-07-20 10:39 UTC
From: pekka at studio-on-the dot net Assigned:
Status: No Feedback Package: GetImageSize related
PHP Version: 4.3.2 OS: Windows XP Professional SP1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: pekka at studio-on-the dot net
New email:
PHP Version: OS:


 [2003-07-11 15:33 UTC] pekka at studio-on-the dot net
Code snippet works perfectly on Linux/apache (PHP 4.2.2), but in Windows XP/Apache/PHP 4.3.2 even 1000 times is not always enough to get some data back from the function. Mostly it needs between 0 and 200 retries before it gets some data into array.

I have found that this happens and has something to do ONLY with ImageMagick Mogrify created JPGS (Version: @(#)ImageMagick 5.4.6 06/01/02 Q:8). See aforementioned demo for test image url.

Reproduce code:

Expected result:
try 0: | 0:110 | 1: 73 | 2: 2 | 3: width="110" height="73"|

Actual result:


try 0: | 0:110 | 1: 73 | 2: 2 | 3: width="110" height="73"|


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-11 15:51 UTC] pekka at studio-on-the dot net
it should be of course 

Actual result:
e.g. (in Windows):
try 433: | 0:110 | 1: 73 | 2: 2 | 3: width="110" height="73"|
 [2003-07-13 22:00 UTC]
Please try using this CVS snapshot:
For Windows:

Works just fine. Not even 10'000 tries produce any false result. It's propably just some network thing, as you're accessing the image remotely. Try it locally. (drop the url)

 [2003-07-14 04:02 UTC] pekka at studio-on-the dot net
The url on demo is url for obvious reasons. On my localhost with local files I get bitten by this bug. One thing to note is that in Windows when you do NOT add second parameter to getimagesize then it always works. But I need that second parameter too, so...
Must be something Bill has messed up.
Thanks anyway.
 [2003-07-14 12:15 UTC]
Did you try with the snapshot?

 [2003-07-20 10:39 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 20:01:32 2024 UTC