ID: 25072 User updated by: eduard at sitesupra dot com Reported By: eduard at sitesupra dot com -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: WinXP PHP Version: 4.3.2 New Comment:
on 4.3.3RC4-dev same result as 4.3.2 Previous Comments: ------------------------------------------------------------------------ [2003-08-13 05:30:36] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-08-13 05:26:23] eduard at sitesupra dot com Description: ------------ On windows: When you have include() from userstream result of stream_eof() is ignored and stream_read() called 2 times more When few requests occur simultaneosly - apache crushes. On Linux - this works correctly Reproduce code: --------------- <?php class userstream { var $position = 0; var $data = "If you can read this, it worked"; function stream_open($path, $mode, $options, &$opened_path) { return true; } function stream_read($count) { $ret = substr($this->data, $this->position, $count); $this->position += strlen($ret); echo "READ {$this->position}\n"; return $ret; } function stream_eof() { echo "EOF\n"; return $this->position >= strlen($this->data); } function stream_seek($offset,$whence) { echo "SEEK\n"; } function stream_tell() { echo "TELL\n"; return $this->position; } function stream_stat() { echo "STAT\n"; return NULL; } function stream_close() { echo "CLOSE\n"; } } stream_register_wrapper("cookietest", "userstream"); include("cookietest://foo"); ?> Expected result: ---------------- SEEK TELL READ 31 EOF CLOSE If you can read this, it worked Actual result: -------------- SEEK TELL STAT READ 31 EOF READ 31 EOF READ 31 EOF CLOSE If you can read this, it worked ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25072&edit=1