#42468 [Opn->Asn]: Write lock on file_get_contents fails when using a compression stream
| From: | jani@php.net | Date: | Wed, 29 Aug 2007 11:46:18 +0000 |
| Subject: | #42468 [Opn->Asn]: Write lock on file_get_contents fails when using a compression stream | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-116813@lists.php.net to get a copy of this message | ||
ID: 42468
Updated by: jani@php.net
Reported By: daan at react dot nl
-Status: Open
+Status: Assigned
Bug Type: Streams related
-Operating System:
+Operating System: *
-PHP Version: 5.2.3
+PHP Version: 5.2CVS-2007-08-29
-Assigned To:
+Assigned To: iliaa
New Comment:
Ilia, this should output an error when a wrapper does not support
setting options. You shouldn't try locking if a wrapper doesn't support
it.
Previous Comments:
------------------------------------------------------------------------
[2007-08-29 11:03:11] daan at react dot nl
Description:
------------
When using the LOCK_EX flag for the file_put_contents function, and the
filename is a compression stream, no data is written.
Conversely, it does work when the flag is not added, or when no
compression is used.
Reproduce code:
---------------
<?php
file_put_contents('compress.zlib://test.txt', 'blabla', LOCK_EX);
var_dump(file_get_contents('compress.zlib://test.txt'));
Expected result:
----------------
The string 'blabla'
Actual result:
--------------
An empty string
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42468&edit=1