summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/tests/file/bug22414.phpt15
1 files changed, 5 insertions, 10 deletions
diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt
index 8847ded2b8..f6effd272c 100644
--- a/ext/standard/tests/file/bug22414.phpt
+++ b/ext/standard/tests/file/bug22414.phpt
@@ -1,12 +1,7 @@
--TEST--
Bug #22414: passthru() does not read data correctly
---SKIPIF--
-<?php
- if (ini_get("safe_mode")) {
- die('skip this test cannot be run under safe-mode');
- }
-?>
--INI--
+safe_mode=
output_handler=
--FILE--
<?php
@@ -15,17 +10,17 @@ output_handler=
$tmpfile = tempnam('/tmp', 'phpt');
/* Regular Data Test */
- passthru($php . ' -r " echo \"HELLO\"; "');
+ passthru($php . ' -n -r " echo \"HELLO\"; "');
echo "\n";
/* Binary Data Test */
@unlink($pwd . '/passthru_test');
- $cmd = $php . " -r \\\" readfile(@getenv(TEST_PHP_EXECUTABLE)); \\\"";
- $cmd = $php . ' -r \' passthru("'.$cmd.'"); \' > '.$tmpfile ;
+ $cmd = $php . ' -n -r \"readfile(@getenv(\'TEST_PHP_EXECUTABLE\')); \"';
+ $cmd = $php . ' -n -r \' passthru("'.$cmd.'"); \' > '.$tmpfile ;
exec($cmd);
-
+
if (md5_file($php) == md5_file($tmpfile)) {
echo "Works\n";
} else {