diff options
author | foobar <sniper@php.net> | 2003-07-15 07:06:42 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2003-07-15 07:06:42 +0000 |
commit | 94a19d1bc6c35510de05b92450fa435362dba0b9 (patch) | |
tree | 4446a731ca7de4cd452eb64114add9f2a6649663 | |
parent | fdf3019ecaab102d33b8a2790a3d003673eeba0a (diff) | |
download | php-git-94a19d1bc6c35510de05b92450fa435362dba0b9.tar.gz |
Make this test work regardless of safe_mode setting (bug #24654)
-rw-r--r-- | ext/standard/tests/file/bug22414.phpt | 15 |
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 { |