#45303 [Opn->Csd]: Opening php:// wrapper in append mode results in a warning
| From: | lbarnaud@php.net | Date: | Mon, 03 Nov 2008 16:59:27 +0000 |
| Subject: | #45303 [Opn->Csd]: Opening php:// wrapper in append mode results in a warning | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-130566@lists.php.net to get a copy of this message | ||
ID: 45303
Updated by: lbarnaud@php.net
Reported By: nforbes@php.net
-Status: Open
+Status: Closed
Bug Type: Streams related
Operating System: Linux (Debian)
PHP Version: 5.2CVS-2008-06-18 (CVS)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2008-06-18 18:24:38] nforbes@php.net
Description:
------------
When attempting to fopen any php:// wrapper in append mode (which
should be equivalent to writing), PHP gives the following warning
before returning the resource:
fopen(): cannot seek on a pipe
The resource returned behaves properly.
Reproduce code:
---------------
<?php
var_dump(fopen("php://stdout", "a"));
var_dump(fopen("php://stdin", "a"));
var_dump(fopen("php://stderr", "a"));
?>
Expected result:
----------------
Warning: fopen(): cannot seek on a pipe in <...> on line 2
resource(5) of type (stream)
Warning: fopen(): cannot seek on a pipe in <...> on line 3
resource(6) of type (stream)
Warning: fopen(): cannot seek on a pipe in <...> on line 4
resource(7) of type (stream)
Actual result:
--------------
resource(5) of type (stream)
resource(6) of type (stream)
resource(7) of type (stream)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45303&edit=1