Ubuntu 22.04 default PHP package (2:8.1+92ubuntu1) contains the pre-8.1.6 bug:
https://www.php.net/ChangeLog-8.php#8.1.6
Streams:
Fixed php://temp does not preserve file-position when switched to temporary file.
Fixed in:
https://github.com/php/php-src/commit/84c18f9f04cb9852d992194e613927154f765192
Current workaround:
When opening php://temp, prevent its conversion to a file by increasing maxmemory to whatever number your application needs:
$fp = fopen("php://temp/maxmemory:5242880", 'w+');
Ubuntu 22.04 default PHP package (2:8.1+92ubuntu1) contains the pre-8.1.6 bug:
https:/ /www.php. net/ChangeLog- 8.php#8. 1.6
Streams:
Fixed php://temp does not preserve file-position when switched to temporary file.
Fixed in:
https:/ /github. com/php/ php-src/ commit/ 84c18f9f04cb985 2d992194e613927 154f765192
Current workaround:
When opening php://temp, prevent its conversion to a file by increasing maxmemory to whatever number your application needs:
$fp = fopen(" php://temp/ maxmemory: 5242880" , 'w+');