Skip to content

stream_set_blocking return false (Windows) #42

@yogevLevi

Description

@yogevLevi

hello
when i try to create PDF I have a problem in the function _pipeExec
fgets stuck in infinite loop (i work on windows )
Configuration:
Windows 7
PHP 5.6.2
laravel 4.2

    stream_set_blocking($pipes[1], 0);
    stream_set_blocking($pipes[2], 0);

both return false
and then in the loop its stuck

while ($read_error != false or $read_output != false){

        if ($read_output != false){
            if(feof($pipes[1])){
                fclose($pipes[1]);
                $read_output = false;
            } else {

                $str = fgets($pipes[1], 1024);//<------Stuck here
                $len = strlen($str);
                if ($len){
                    $stdout .= $str;
                    $buffer_len += $len;
                }
            }
        }

.
.
.
}
i try to setting $read_error = true; to false and it didn't work for me :(
Is there another solution to the problem?

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