#30516 [Fbk->NoF]: file_put_contents doesnt work with FTP
| From: | sniper@php.net | Date: | Sun, 20 Mar 2005 17:05:02 +0000 |
| Subject: | #30516 [Fbk->NoF]: file_put_contents doesnt work with FTP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-75585@lists.php.net to get a copy of this message | ||
ID: 30516
Updated by: sniper@php.net
Reported By: nlopess@php.net
-Status: Feedback
+Status: No Feedback
Bug Type: FTP related
Operating System: linux
PHP Version: 5CVS-2004-10-21 (dev)
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2005-03-07 22:23:17] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
..and again, update the version field accordinly.
------------------------------------------------------------------------
[2004-10-21 19:17:21] nlopess@php.net
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:anonymous@10.1.1.54/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://...@10.1.1.54/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 this bug report at http://bugs.php.net/?id=30516&edit=1