It is not 0 => array("pipe" => "r") , but 0 => array("pipe", "r") ^^
In addition, when specifying the file name, you must specify the mode used. This works on my machine:
$descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("file", "logs/errors.txt", "a") ); // Create child and start process $child = array("process" => null, "pipes" => null); $child["process"] = proc_open("notepad.exe > nul 2>&1", $descriptorspec, $child["pipes"]);
source share