#29628 [Opn]: copy(http://url/pic.gif): failed to open stream: Bad file descriptor
| From: | qkman at 21cn dot com | Date: | Sat, 14 Aug 2004 15:33:39 +0000 |
| Subject: | #29628 [Opn]: copy(http://url/pic.gif): failed to open stream: Bad file descriptor | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64610@lists.php.net to get a copy of this message | ||
ID: 29628
User updated by: qkman at 21cn dot com
Reported By: qkman at 21cn dot com
Status: Open
Bug Type: Unknown/Other Function
Operating System: win2003 IIS6
PHP Version: 5.0.0
New Comment:
Please tell me why ???!!! thank !
Previous Comments:
------------------------------------------------------------------------
[2004-08-12 09:52:05] qkman at 21cn dot com
Description:
------------
I can't copy files from URLs (like http:// or ftp://) !
Fail in php5 , php4.3.8 , php4.3.6 , php4.3.4.4
Why ???
Reproduce code:
---------------
<?php
$s="http://bugs.php.net/gifs/logo-bug.gif";
$d="E:/t/t.gif";
echo "allow_url_fopen = ".ini_get("allow_url_fopen")."<hr>";
echo "default_socket_timeout =
".ini_get("default_socket_timeout")."<hr>";
if(copy($s,$d)) echo "copy ok<br>";
else echo "copy error<br>";
?>
Expected result:
----------------
allow_url_fopen = 1
--------------------------------------------------------------------------------
default_socket_timeout = 60
--------------------------------------------------------------------------------
copy ok
Actual result:
--------------
allow_url_fopen = 1
--------------------------------------------------------------------------------
default_socket_timeout = 60
--------------------------------------------------------------------------------
copy error
PHP Warning: copy(http://bugs.php.net/gifs/logo-bug.gif): failed to
open stream: Bad file descriptor in E:\t\t5.php on line 9
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29628&edit=1