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
unable to set stream resource to non-blocking - PHP 7.1 stream_set_blocking doesn't work #117
PHP fatal error: uncaugt RuntimeException: unable to set stream resource to non-blocking mode in ...../vendor/react/stream/src/WritableResourceStream.php:34
Hi @berbagimadani! I'm not sure I follow what you're trying to do and what your issue is, as it's a bit unclear what you're trying to achieve from the description you've posted.
May I ask you provide a simple gist of what you're trying to achieve? Thanks!
Your referenced PHP changelog only links to https://bugs.php.net/bug.php?id=72853 which leads to php/php-src@abe0090 which is a minor fix in PHP 7.0.11 and only affects stream_get_meta_data() which does not appear to be relevant here.
Yes, this is a known issue for Windows only and is covered in our README.
Windows does not offer an API to read from console input without blocking in PHP. Unfortunately, until https://bugs.php.net/bug.php?id=47918 is addressed (which is unlikely to happen any time soon), there's nothing we could do to work around this (#46).
In order to avoid this issue: Simply don't read from console input on Windows (for example clue/psocksd@c2f2f90),
I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can reopen this 👍
Have the same issue on Centos 7 PHP Fatal error: Uncaught RuntimeException: Unable to set stream resource to non-blocking mode in .../vendor/react/stream/src/WritableResourceStream.php:35
@merovinh We're not aware of any such limitations except for process pipes on Windows. Can you create a new issue with some steps to reproduce the problem you're seeing? 👍
Activity
clue commentedon Oct 16, 2017
Hi @berbagimadani! I'm not sure I follow what you're trying to do and what your issue is, as it's a bit unclear what you're trying to achieve from the description you've posted.
May I ask you provide a simple gist of what you're trying to achieve? Thanks!
Your referenced PHP changelog only links to https://bugs.php.net/bug.php?id=72853 which leads to php/php-src@abe0090 which is a minor fix in PHP 7.0.11 and only affects
stream_get_meta_data()which does not appear to be relevant here.Given you're using Windows, it looks like you may be affected by #46 and/or reactphp/child-process#41 instead.
berbagimadani commentedon Oct 17, 2017
Thankyou for reply,

i am using -windows 7 64bit -php 7.1.9
when i run code example "cat.php" here there is an error.
I want no errors like the picture above
Thank's
clue commentedon Oct 17, 2017
Yes, this is a known issue for Windows only and is covered in our README.
Windows does not offer an API to read from console input without blocking in PHP. Unfortunately, until https://bugs.php.net/bug.php?id=47918 is addressed (which is unlikely to happen any time soon), there's nothing we could do to work around this (#46).
In order to avoid this issue: Simply don't read from console input on Windows (for example clue/psocksd@c2f2f90),
I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can reopen this 👍
merovinh commentedon Nov 20, 2019
Have the same issue on Centos 7
PHP Fatal error: Uncaught RuntimeException: Unable to set stream resource to non-blocking mode in .../vendor/react/stream/src/WritableResourceStream.php:35PHP 7.2.14
clue commentedon Nov 20, 2019
@merovinh We're not aware of any such limitations except for process pipes on Windows. Can you create a new issue with some steps to reproduce the problem you're seeing? 👍
merovinh commentedon Nov 20, 2019
@clue I created an issue with example here Kucoin/kucoin-php-sdk#68
kucoin-php-sdk dependencies uses reactphp, and the problem somewhere there. Unfortunately I can't create example independent of third party.