Skip to content

unable to set stream resource to non-blocking - PHP 7.1 stream_set_blocking doesn't work #117

Closed

Description

@berbagimadani

I am using
-windows 7 64 bit
-php 7.1.9

PHP fatal error: uncaugt RuntimeException: unable to set stream resource to non-blocking mode in ...../vendor/react/stream/src/WritableResourceStream.php:34

look here, "stream_set_blocking doesn't work"
https://raw.githubusercontent.com/php/php-src/PHP-7.1/NEWS

please help. Thank you

Activity

  1. clue commented on Oct 16, 2017

    @clue
    Member

    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.

  2. berbagimadani commented on Oct 17, 2017

    @berbagimadani
    Author

    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.
    writable-stream-error

    I want no errors like the picture above

    Thank's

  3. clue commented on Oct 17, 2017

    @clue
    Member

    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 👍

  4. merovinh commented on Nov 20, 2019

    @merovinh

    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

    PHP 7.2.14

  5. clue commented on Nov 20, 2019

    @clue
    Member

    @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? 👍

  6. merovinh commented on Nov 20, 2019

    @merovinh

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions