diff --git a/ext/standard/tests/file/bug72035.phpt b/ext/standard/tests/file/bug72035.phpt index 6ed7fe470fc..05ad8d817cd 100644 --- a/ext/standard/tests/file/bug72035.phpt +++ b/ext/standard/tests/file/bug72035.phpt @@ -21,7 +21,8 @@ $cmd = "$cgi -n -C $fl"; /* Need to run CGI with the env reset. */ $desc = array(0 => array("pipe", "r")); -$proc = proc_open($cmd, $desc, $pipes, getcwd(), array()); +/* PATH is needed to find ASan DLLs (and maybe others) on Windows */ +$proc = proc_open($cmd, $desc, $pipes, getcwd(), array('PATH' => getenv('PATH'))); if (is_resource($proc)) { echo stream_get_contents($pipes[0]); diff --git a/ext/standard/tests/file/proc_open01.phpt b/ext/standard/tests/file/proc_open01.phpt index 5ebfc72351b..6318b67b718 100644 --- a/ext/standard/tests/file/proc_open01.phpt +++ b/ext/standard/tests/file/proc_open01.phpt @@ -8,10 +8,11 @@ $php = getenv('TEST_PHP_EXECUTABLE_ESCAPED'); if ($php === false) { die("no php executable defined"); } +/* PATH is needed to find ASan DLLs (and maybe others) on Windows */ $proc = proc_open( "$php -n", array(0 => array('pipe', 'r'), 1 => array('pipe', 'w')), - $pipes, getcwd(), array(), array() + $pipes, getcwd(), array('PATH' => getenv('PATH')), array() ); if ($proc === false) { print "something went wrong.\n"; diff --git a/ext/standard/tests/general_functions/proc_open_array.phpt b/ext/standard/tests/general_functions/proc_open_array.phpt index 239dc116cd6..964b8391cb6 100644 --- a/ext/standard/tests/general_functions/proc_open_array.phpt +++ b/ext/standard/tests/general_functions/proc_open_array.phpt @@ -44,7 +44,8 @@ fpassthru($pipes[1]); proc_close($proc); putenv('ENV_1=ENV_1'); -$env = ['ENV_2' => 'ENV_2']; +/* PATH is needed to find ASan DLLs (and maybe others) on Windows */ +$env = ['ENV_2' => 'ENV_2', 'PATH' => getenv('PATH')]; $cmd = [$php, '-n', '-r', 'var_dump(getenv("ENV_1"), getenv("ENV_2"));']; echo "\nEnvironment inheritance:\n"; diff --git a/ext/standard/tests/streams/proc_open_bug60120.phpt b/ext/standard/tests/streams/proc_open_bug60120.phpt index fc98913c4cc..ebb6003fdb6 100644 --- a/ext/standard/tests/streams/proc_open_bug60120.phpt +++ b/ext/standard/tests/streams/proc_open_bug60120.phpt @@ -21,6 +21,7 @@ TMPFILE $command = sprintf("%s -n %s", getenv('TEST_PHP_EXECUTABLE_ESCAPED'), escapeshellarg($file)); +/* PATH is needed to find ASan DLLs (and maybe others) on Windows */ $process = proc_open( $command, [ @@ -30,7 +31,7 @@ $process = proc_open( ], $pipes, getcwd(), - [], + ['PATH' => getenv('PATH')], [ 'suppress_errors' => true, 'bypass_shell' => false diff --git a/ext/standard/tests/streams/proc_open_bug64438.phpt b/ext/standard/tests/streams/proc_open_bug64438.phpt index df06ff81638..4342dd82059 100644 --- a/ext/standard/tests/streams/proc_open_bug64438.phpt +++ b/ext/standard/tests/streams/proc_open_bug64438.phpt @@ -14,7 +14,8 @@ $descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w')) $stdin = str_repeat('*', 4097); $options = array_merge(array('suppress_errors' => true, 'bypass_shell' => false)); -$process = proc_open($cmd, $descriptors, $pipes, getcwd(), array(), $options); +/* PATH is needed to find ASan DLLs (and maybe others) on Windows */ +$process = proc_open($cmd, $descriptors, $pipes, getcwd(), array('PATH' => getenv('PATH')), $options); foreach ($pipes as $pipe) { stream_set_blocking($pipe, false);