Comments (7)
just did some test, which confirmed that my problem is proc_open is on the disable_function
list.
would be great to get a better error message in this case, so you dont need to dig into the dark.
from process.
@staabm Do you want to provide a PR?
from process.
I will give it a try. Could take a few weeks though
from process.
tried to repro this behaviour on my windows laptop at home and could't repro with basic-command
from within the process\examples repos.
C:\xampp7.1.4\htdocs\amphp\process>C:\xampp7.1.4\php\php.exe examples\basic-command.php
PHP Fatal error: Uncaught Amp\Process\ProcessException: Could not start process Errno: 2; proc_open() has been disabled for security reasons in C:\xampp7.1.4\htdocs\amphp\process\lib\Internal\Windows\Runner.php:88
Stack trace:
#0 C:\xampp7.1.4\htdocs\amphp\process\lib\Process.php(96): Amp\Process\Internal\Windows\Runner->start('cmd /c echo Hel...', '', Array, Array)
#1 C:\xampp7.1.4\htdocs\amphp\process\examples\basic-command.php(14): Amp\Process\Process->start()
#2 [internal function]: {closure}('a', NULL)
#3 C:\xampp7.1.4\htdocs\amphp\process\vendor\amphp\amp\lib\Coroutine.php(39): Generator->current()
#4 C:\xampp7.1.4\htdocs\amphp\process\vendor\amphp\amp\lib\Loop\Driver.php(119): Amp\Coroutine->__construct(Object(Generator))
#5 C:\xampp7.1.4\htdocs\amphp\process\vendor\amphp\amp\lib\Loop\Driver.php(70): Amp\Loop\Driver->tick()
#6 C:\xampp7.1.4\htdocs\amphp\process\vendor\amphp\amp\lib\Loop.php(76): Amp\Loop\Driver->run()
#7 C:\xampp7.1.4\htdocs\amphp\process\examples\basic-command.php(20): Amp\Loop::run(Object(Closure))
# in C:\xampp7.1.4\htdocs\amphp\process\lib\Internal\Windows\Runner.php on line 88
so it seems the origin issue might be related to non-windows builds, or it is somehow related to the Abstraction classes used in the more complex example scripts posted above.
still investigating.
from process.
another idea: this is fixed behaviour in the current master version which is not yet published (or is not part) of the installed package of my at-office VM (can verify this only in a few weeks after PTO)
from process.
tried to repro the code from the initial description on windows with latest parallel/process and couldn't repro the error neither.
from process.
Closing this issue then.
from process.
Related Issues (20)
- amphp/process kills sub process on exit HOT 7
- process immediate exit after sigterm HOT 6
- Amphp gets stuck in and infinite loop doing nothing if firewall delays port access HOT 6
- Not running at windows HOT 3
- How to start background processes HOT 2
- Connection failed: Amp\TimeoutException: Operation timed out in amphp\amp\lib\functions.php:275 HOT 2
- ProcessException with message 'Could not determine PID' HOT 1
- not get response of a user define method HOT 2
- php8 on windows with error HOT 4
- SocketConnector fails to close sockets on PHP8/Win
- Application stucks when launch application that requires elevated privileges on Windows HOT 1
- php8 on windows with error HOT 5
- Zombie Processes HOT 3
- v2 not working on FPM while v1 does HOT 8
- Remove Amp\Process\Internal\Windows\Barrier?
- Catching STDERR output HOT 3
- Doesn't work with dg/bypass-finals HOT 1
- Exception "ProcessException: Received 0 of 5 expected bytes" when reading from stdout out of time HOT 10
- Process getting stuck because of a full STDOUT/STDERR pipe
- amphp/process 1.x on Windows: Trying to start a non-existent executable gets stuck forever HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from process.