From:             [EMAIL PROTECTED]
Operating system: linux
PHP version:      5CVS-2004-10-21 (dev)
PHP Bug Type:     FTP related
Bug description:  file_put_contents doesnt work with FTP

Description:
------------
file_put_contents isn't working with FTP (or I'm doing 
something wrong). 
 
Tested in PHP 5.0.3-dev 

Reproduce code:
---------------
<?php

$context = stream_context_create(array('ftp' => array('overwrite' =>
true)));

if(file_put_contents("ftp://anonymous:[EMAIL 
PROTECTED]/MS/OPEN-R/MW/OBJS/SOCROB4L.BIN",
file_get_contents('src/SocRob4l.bin'), null, $context) === false) {
        echo "There was an error";
} else {
        echo "The upload completed succesfully";
}

?>

Expected result:
----------------
The upload completed succesfully 

Actual result:
--------------
Warning: 
file_put_contents(ftp://[EMAIL PROTECTED]/MS/OPEN-R/MW/OBJS/SOCROB4L.BIN): 
failed to open stream: Operation now in progress 
in /home/socrob4l/consola/update4.php on line 5 
There was an error 

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

Reply via email to