gabrielrcouto / php-gui

Extensionless PHP Graphic User Interface library
2.24k stars 175 forks source link

Uncaught LogicException: Windows isn't supported due to the blocking nature of STDIN/STDOUT/STDERR pipes #138

Open bozhinov opened 6 years ago

bozhinov commented 6 years ago

hello,

I get this with PHP 7.2.6 x86

C:\Users\Momchil\Desktop\PHP-GUI>php examples\01-basic\example.php PHP Fatal error: Uncaught LogicException: Windows isn't supported due to the blocking nature of STDIN/STDOUT/STDERR pipes. in C:\Users\Momchil\Desktop\PHP-GUI\react\ChildProcess\Process.php:52 Stack trace:

0 C:\Users\Momchil\Desktop\PHP-GUI\src\Application.php(286): React\ChildProcess\Process->__construct('.\phpgui-x86_64...', 'C:\Users\Momchi...')

1 C:\Users\Momchil\Desktop\PHP-GUI\examples\01-basic\example.php(82): Gui\Application->run()

2 {main}

thrown in C:\Users\Momchil\Desktop\PHP-GUI\react\ChildProcess\Process.php on line 52

Running all latest sources from GitHub So, Windows is no more ?

still-dreaming-1 commented 4 years ago

When using the latest master code, and I don't experience this. But I manually updated the react/child-process dependency to a newer version, as I was trying to update php-gui to use the newest version, and then I experience a similar exception. Looking at their (react/child-process) release notes, it sounds like this was perhaps not compatible with Windows all along, but they made it more clear by adding this exception you ran into. I'm not totally clear on that point, was it really not compatible all along, or did it become not compatible when they added the exception? Regardless, with even newer versions, they (react/child-process) did add limited Windows support, but you have to use special workarounds. I don't know if php-gui can be changed to use those workarounds or if they are too limiting.

https://github.com/reactphp/child-process/releases

Unfortunately that project's suggestion to use WSL if running on Windows is not a great solution in this case, as running GUI applications on WSL is not a good experience, or at least I haven't gotten it to work very well.