From 8b02b1eb7ec3b810fc0b3b148e65136a0b8fa2f2 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 19 Apr 2003 17:45:55 +0000 Subject: [PATCH] MFH --- ext/standard/tests/file/bug22414.phpt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt index b770bcc53f..6902b643b1 100644 --- a/ext/standard/tests/file/bug22414.phpt +++ b/ext/standard/tests/file/bug22414.phpt @@ -5,10 +5,6 @@ Bug #22414: passthru() does not read data correctly if (ini_get("safe_mode")) { die('skip this test cannot be run under safe-mode'); } - $cat_path = @shell_exec("which cat"); - if (empty($cat_path)) { - die('skip cat binary needed for this test is not avaliable'); - } ?> --POST-- --GET-- @@ -25,7 +21,8 @@ Bug #22414: passthru() does not read data correctly /* Binary Data Test */ @unlink($pwd . '/passthru_test'); - $cmd = $php . ' -r \' passthru("cat ' . $php . '"); \' > ' . $pwd . '/passthru_test'; + $cmd = "sapi/cli/php -r \\\" readfile(@getenv(TEST_PHP_EXECUTABLE)); \\\""; + $cmd = $php . ' -r \' passthru("'.$cmd.'"); \' > ' . $pwd . '/passthru_test'; exec($cmd); if (md5_file($php) == md5_file($pwd . '/passthru_test')) { -- 2.40.0