FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18457&edit=1

ID: 18457
Updated by: david@echolibre.com
Reported By: david at echolibre dot com
Summary: Stream Wrapper ignores various writing modes
-Status: Open
+Status: Closed
Type: Bug
Package: Services_Amazon_S3
Operating System: Irrelevant
Package Version: SVN
PHP Version: 5.3.6
-Assigned To:
+Assigned To: davidc
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: davidc
This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.




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

[2011-04-19 14:30:56] davidc

Added #patch bug:18457;patch:bug18457.diff;revision:1303223456;.

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

[2011-04-19 14:29:04] davidc

Description:
------------
While testing the Stream Wraper (Services_Amazon_S3_Stream)
we've noticed that when using FILE_APPEND with a registered
stream, the content would not get appended.

After looking at the stream_close override, we've noticed that
only the mode 'w' is taken into consideration.

Test script:
---------------
<?php

require_once 'Services/Amazon/S3.php';
require_once 'Services/Amazon/S3/Stream.php';
require_once 'Services/Amazon/S3/AccessControlList.php';

Services_Amazon_S3_Stream::register('s3',
array('access_key_id' => 'xxx',
'secret_access_key' => 'yyy',
'acl' =>
Services_Amazon_S3_AccessControlList::ACL_PUBLIC_READ,
)
);

$bucket = 'testing-stream-s3';
$file = 's3://' . $bucket . '/example.txt';

file_put_contents($file, 'one');
file_put_contents($file, 'two', FILE_APPEND);
echo file_get_contents($file);

Expected result:
----------------
onetwo

Actual result:
--------------
one

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 19, '11 at 2:12p
activeApr 19, '11 at 2:12p
posts1
users1
websitepear.php.net

1 user in discussion

David: 1 post

People

Translate

site design / logo © 2022 Grokbase