#21479 [Opn]: function crashes when used with a URL
| From: | sniper@php.net | Date: | Thu, 23 Jan 2003 05:30:23 +0000 |
| Subject: | #21479 [Opn]: function crashes when used with a URL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-31036@lists.php.net to get a copy of this message | ||
ID: 21479
Updated by: sniper@php.net
Reported By: info@ofek.com
Status: Open
Bug Type: GetImageSize related
Operating System: Windows 2000
PHP Version: 4.3.0
New Comment:
I can not reproduce this within Linux, I guess this is
yet another windows only bug..
Previous Comments:
------------------------------------------------------------------------
[2003-01-22 22:58:12] info@ofek.com
HOLD IT - I just found out exactly how to reproduce it. please read
carefully.
the code is:
<?php
function ImageExists($url) {
$r=@getimagesize($url);
return $r[2]!=0;
}
echo ImageExists('http://domain/dir1/dir2/dir3/image.gif');
?>
make sure the path:
http://domain/dir1/dir2/dir3/
containts THREE directories after the domain (i.e. 6 forward-slashes
total), and that the PATH physically EXISTS.
AND make sure that the file (in code 'image.gif') DOES NOT exist.
You can test against:
http://economads.com/libaware/_font/title/image.gif
This crashes on my server - running PHP 4.3.0 as CGI with IIS Win2000.
Hope this helps.
------------------------------------------------------------------------
[2003-01-20 17:13:18] sniper@php.net
Ahha..so you had propably the old php4ts.dll there, from
previous version...
------------------------------------------------------------------------
[2003-01-20 17:08:48] info@ofek.com
crashes means gpf .. a windows application error, and then error cgi
returned wrong headers, etc.
anyway, i have installed 4.3.0 once again (removed it after discovering
crash), and not like last time - rebooted the machine - and it seems to
fix the problem.
------------------------------------------------------------------------
[2003-01-20 14:41:41] sniper@php.net
What do you mean with 'crashes' ? And does getimagesize()
work for local files? <?php getimagesize('image.jpg'); ?>
or something like that..?
------------------------------------------------------------------------
[2003-01-20 12:43:30] info@ofek.com
OK - just checked, and php crashes regardless of the '@' before
getimagesize
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21479
--
Edit this bug report at http://bugs.php.net/?id=21479&edit=1