Bug #75515 [NEW]: "stream_copy_to_stream" doesn't stream anymore
| From: | nicolas dot grekas+php at gmail dot com | Date: | Mon, 13 Nov 2017 09:56:21 +0000 |
| Subject: | Bug #75515 [NEW]: "stream_copy_to_stream" doesn't stream anymore | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-212564@lists.php.net to get a copy of this message | ||
From: nicolas dot grekas+php at gmail dot com
Operating system: Ubuntu
PHP version: 7.2.0RC6
Package: Scripting Engine problem
Bug Type: Bug
Bug description:"stream_copy_to_stream" doesn't stream anymore
Description:
------------
See test script.
This behavior change has been introduced in PHP7.2RC6, and can be fixed
by the change on 710 of main/streams/streams.c:
```
- if (!stream->wrapper || stream->wrapper->is_url) {
+ if (stream->wrapper != &php_plain_files_wrapper) {
```
Test script:
---------------
run on the shell:
php -r 'echo "ping"; stream_copy_to_stream(STDIN, STDOUT);'
then type something to populate stdin, and hit "enter".
On "enter", the input should be copied to the STDOUT.
But on RC6, this doesn't happen until STDIN is closed.
Expected result:
----------------
see test script
Actual result:
--------------
see test script
--
Edit bug report at https://bugs.php.net/bug.php?id=75515&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75515&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75515&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75515&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75515&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75515&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75515&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75515&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75515&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75515&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75515&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75515&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75515&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75515&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75515&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75515&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75515&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75515&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75515&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75515&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75515&r=mysqlcfg