ID:          40574
 Comment by:  mat at actiondb dot com
 Reported By: [EMAIL PROTECTED]
 Status:      No Feedback
 Bug Type:    Streams related
 PHP Version: 5.2.1
 New Comment:

The example:

<?php
$c = stream_context_create(array("ftp" => array("overwrite"=>true)));
var_dump(file_put_contents("ftp://localhost/upload/data.txt";, "data",
0, $c));
?>

Will output int(4), but if you check the FTP server, the file will
probably be 0 bytes.

I have been trying to resolve this problem myself, and it seems that if
the file is greater than around 30K-35K (maybe it's 32K?), the upload
works.

I'm using PHP 5.2.1 on Apache 2.2.4 installed on Win2k3


Previous Comments:
------------------------------------------------------------------------

[2007-03-14 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2007-03-06 11:55:08] [EMAIL PROTECTED]

Can't reproduce using vsftpd.

------------------------------------------------------------------------

[2007-03-05 13:48:52] [EMAIL PROTECTED]

Using proftpd with authentication fails

php > $c = stream_context_create(array("ftp" =>
array("overwrite"=>true)));
php > var_dump(file_put_contents("ftp://xx:[EMAIL PROTECTED]/data.txt",
"data", 0,  $c));


Warning: file_put_contents(): Only 0 of 4 bytes written, possibly out
of free disk space in php shell code on line 1

------------------------------------------------------------------------

[2007-03-01 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2007-02-21 13:32:46] [EMAIL PROTECTED]

<?php
$c = stream_context_create(array("ftp" => array("overwrite"=>true)));
var_dump(file_put_contents("ftp://localhost/upload/data.txt";, "data",
0, $c));
?>
outputs:
int(4)

Check your FTP server?

------------------------------------------------------------------------

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/40574

-- 
Edit this bug report at http://bugs.php.net/?id=40574&edit=1

Reply via email to