php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23979 @getimagesize
Submitted: 2003-06-03 05:32 UTC Modified: 2009-05-12 01:00 UTC
Votes:6
Avg. Score:3.8 ± 0.9
Reproduced:6 of 6 (100.0%)
Same Version:1 (16.7%)
Same OS:3 (50.0%)
From: diana at interhotel dot com Assigned:
Status: No Feedback Package: GetImageSize related
PHP Version: 4.3.2 OS: windows
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-06-03 05:32 UTC] diana at interhotel dot com
I use @getimagesize to resize pictures that I get from a url which comes
from a database which is always changing.  The problem is that sometimes the
url does not contain the picture is is supposed to , and then I get the following error, I thought this was fixed in version 4.3.2 but I still get it:
Warning: getimagesize(http://www.hotelresb2b.com/images/hoteles/P1KYHC022030.JPG): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found at c:\inetpub\wwwroot\web\site\ReservationManager.php line 299.
Warning: getimagesize(http://www.hotelresb2b.com/planos/PLKYHC022030.GIF): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found at c:\inetpub\wwwroot\web\site\ReservationManager.php line 312.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-03 05:37 UTC] derick@php.net
Sounds like a stream problem, assigning to Wez.
Can you please come up with a short script to reproduce this problem, without using a database?
 [2003-06-03 11:18 UTC] iliaa@php.net
I cannot replicate this Linux and the original report suggests that the script was executed on Windows. So, it is likely this is a win32 only bug.
 [2003-07-02 23:44 UTC] nilanjan at unlimitedfx dot com
getimagesize() fails for remote files on PHP 4.3.2 on SunOS - so I suppose this kind of a problem is not limited to a Win32 platform...

I get the following error:

Warning: getimagesize(http://www.exoticindiaart.com/panels/wb05sm.jpg): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
 [2003-07-03 03:43 UTC] diana dot castillo at nvtechnologies dot com
I am the one who originally reported this, but I dont remember my password to comment on it, my original report was with diana@interhotel.com email.
I found out that there was something I could change in my error reporting program so that the error would not print out to the screen .
 [2003-07-24 21:09 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

I should note that when encountering an invalid URL getimagesize() will print a warning (simular to the one shown in prior reports) and return false. That is not a bug.
If 404 code is returned and the image is valid there is a possibility that the webserver doing some sort of filtering filtering (based on http refer or user agent) that PHP does not pass resulting in a 404 error code being returned by the webserver.
 [2003-07-29 07:25 UTC] sniper@php.net
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.


 [2009-05-04 18:16 UTC] cosbat at gmail dot com
Dear all,

  I am using PHP Version 5.2.0-8+etch11 and I am still getting the following warning:

[function.getimagesize]: failed to open stream: HTTP request failed! HTTP/1.1 410. 

  I have seen that this bug was under debate for version 4.x of php.

  I would like to mention that I have tested my website both on Windows XP and on Linux (debian etch with apache 2) and on both environments I get the same problem.

  Could you please suggest a workaround?
 [2009-05-04 18:26 UTC] pajoye@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-05-12 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC