#30157 [Opn->Asn]: ftell() function don't use stream_tell()
From: tony2001@php.net Date: Sat, 12 Feb 2005 23:50:11 +0000 Subject: #30157 [Opn->Asn]: ftell() function don't use stream_tell() References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-73961@lists.php.net to get a copy of this message
ID: 30157
Updated by: tony2001@php.net
Reported By: tendencies at free dot fr
-Status: Open
+Status: Assigned
Bug Type: Filesystem function related
Operating System: Windows and Linux
PHP Version: 5CVS-2004-09-19 (dev)
-Assigned To:
+Assigned To: wez
Previous Comments:
------------------------------------------------------------------------
[2004-09-19 21:01:19] tendencies at free dot fr
Description:
------------
For a test, I use wrapper_register() to register a new wrapper. For
information, I use PHP5 CVS and apache.
I want to create a wrapper and use ftell() to return an integer
different from the length of the string (normal comportement). I
implement the method stream_tell() and call ftell(), but surprise, this
function don't use the method stream_tell().
Reproduce code:
---------------
<?php
class fileWrapper {
var $fp;
function stream_open($path, $mode, $options, &$opened_path){
$url = parse_url($path);
$this->fp = fopen($url["host"], $mode);
return true;
}
function stream_write($data){
return fwrite($this->fp, $data);
}
function stream_tell(){
echo "debug message";
return ftell($this->fp);
}
function stream_close(){
return fclose($this->fp);
}
}
stream_wrapper_register("test", "fileWrapper");
$fp = fopen("test://file.txt", "w+");
fwrite($fp, "test");
echo "I test the echo debug in stream_tell() method:";
echo ftell($fp)."\n";
fclose($fp);
?>
Expected result:
----------------
Use the code above, I write a "debug message" in the method
stream_tell() but no message is writted in my screen, just this :
I test the echo debug in stream_tell() method:0
I think that it's a bug but if not, all my apologies.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30157&edit=1
Thread (21 messages)
- #30157 [Opn->Asn]: ftell() function don't use stream_tell()
- #30157 [Asn]: ftell() function don't use stream_tell()
- #30157 [Asn]: ftell() function don't use stream_tell()
- #30157 [Asn]: ftell() function don't use stream_tell()
- #30157 [Asn]: ftell() function don't use stream_tell()
- #30157 [Asn]: ftell() function does not use stream_tell()
- #30157 [Asn]: ftell() function does not use stream_tell()
- #30157 [Com]: ftell() function does not use stream_tell()
- Req #30157 [Asn->Opn]: ftell() function does not use stream_tell()
- Bug #30157 [Com]: ftell() function does not use stream_tell()
- Bug #30157 [Opn]: ftell() function does not use stream_tell()
- Bug #30157 [Com]: ftell() function does not use stream_tell()
- Bug #30157 [Com]: ftell() function does not use stream_tell()
- Bug #30157 [Com]: ftell() function does not use stream_tell()
- Bug #30157 [Opn->Bgs]: ftell() function does not use stream_tell()
- Bug #30157 [Bgs->Tbd]: ftell() function does not use stream_tell()
- Bug #30157 [Tbd->Csd]: ftell() function does not use stream_tell()
- Bug #30157 [Com]: ftell() function does not use stream_tell()
- Bug #30157 [Csd]: ftell() function does not use stream_tell()
- Bug #30157 [Com]: ftell() function does not use stream_tell()
| « previous | php.bugs (#73961) | next » |
|---|