You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[8.2] stream_copy_to_stream doesn't work anymore with resource opened in a append mode #9779
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
$ uname -a
Linux OptiPlex-7060 5.15.0-50-generic #56-Ubuntu SMP Tue Sep 20 13:23:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ php8.2 -v
PHP 8.2.0RC3 (cli) (built: Sep 29 2022 22:31:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.0RC3, Copyright (c) Zend Technologies
with Zend OPcache v8.2.0RC3, Copyright (c), by Zend Technologies
$ dpkg -l|grep php8.2
ii php8.2-bcmath 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 Bcmath module for PHP
ii php8.2-cli 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 command-line interpreter for the PHP scripting language
ii php8.2-common 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 documentation, examples and common module for PHP
ii php8.2-curl 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 CURL module for PHP
ii php8.2-gd 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 GD module for PHP
ii php8.2-imap 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 IMAP module for PHP
ii php8.2-intl 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 Internationalisation module for PHP
ii php8.2-mbstring 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 MBSTRING module for PHP
ii php8.2-mysql 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 MySQL module for PHP
ii php8.2-opcache 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 Zend OpCache module for PHP
ii php8.2-readline 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 readline module for PHP
ii php8.2-soap 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 SOAP module for PHP
ii php8.2-sqlite3 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 SQLite3 module for PHP
ii php8.2-xml 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 DOM, SimpleXML, XML, and XSL module for PHP
ii php8.2-zip 8.2.0~rc3-1+ubuntu22.04.1+deb.sury.org+2 amd64 Zip module for PHP
$ cat /etc/apt/sources.list.d/ondrej-ubuntu-php-jammy.list
deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main
Activity
Use only 'w' mode to operate with stream, see php/php-src#9779
cmb69 commentedon Oct 19, 2022
I cannot reproduce this, neither with PHP 8.2.0RC3 nor with current PHP-8.2 HEAD; this is on Windows, though.
What are the actual file contents? Is it just
bar?Slamdunk commentedon Oct 19, 2022
Sorry, I've updated the bug report to be more descriptive in the expected vs actual output: it's
foobut should befoobarWe had this issue in
shivammathur/setup-php@v2Github Action onPHP 8.2.0-dev (2e6b317fe30cd28fc73cf1c08ca472f6e6c534b3):https://github.com/openspout/openspout/actions/runs/3279348682/jobs/5398785191#step:3:12
As well as on my computer:
jhdxr commentedon Oct 19, 2022
I cannot reproduce this as well. Considering permission issue?
Env: MBP M1
Slamdunk commentedon Oct 19, 2022
Unlikely:
cmb69 commentedon Oct 19, 2022
Please check if that is a duplicate of #9653 (unlikely but maybe it is).
Slamdunk commentedon Oct 19, 2022
Nope:
Slamdunk commentedon Oct 19, 2022
BTW, the error also happens in the official Docker images:
Girgias commentedon Oct 20, 2022
FYI we do not provide official Docker images, Docker just makes them.
jhdxr commentedon Oct 21, 2022
I cannot reproduce it on my rocky linux 8, but I do reproduce it with the docker image given above.
I doubt it's related to #8413
copy_file_rangemay not work well withO_APPEND. refAs I don't have ubuntu on hand, maybe someone working on ubuntu can look into this?
kocoten1992 commentedon Oct 21, 2022
can confirm this.
P/s: I'm using php ppa of https://launchpad.net/~ondrej/+archive/ubuntu/php
bukka commentedon Oct 22, 2022
Fix in #9808
bukka commentedon Oct 23, 2022
Fixed by b732d80