From:             qkman at 21cn dot com
Operating system: win2003 IIS6
PHP version:      5.0.0
PHP Bug Type:     Unknown/Other Function
Bug description:  copy(http://url/pic.gif): failed to open stream: Bad file descriptor

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 bug report at http://bugs.php.net/?id=29628&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29628&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29628&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29628&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29628&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29628&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29628&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29628&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29628&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29628&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29628&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29628&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29628&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29628&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29628&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29628&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29628&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29628&r=float

Reply via email to