cvs: php-src /ext/standard/tests/file bug22414.phpt

From: Date: Tue, 15 Jul 2003 07:06:42 +0000
Subject: cvs: php-src /ext/standard/tests/file bug22414.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-22567@lists.php.net to get a copy of this message
sniper Tue Jul 15 03:06:42 2003 EDT Modified files: /php-src/ext/standard/tests/file bug22414.phpt Log: Make this test work regardless of safe_mode setting (bug #24654) Index: php-src/ext/standard/tests/file/bug22414.phpt diff -u php-src/ext/standard/tests/file/bug22414.phpt:1.8 php-src/ext/standard/tests/file/bug22414.phpt:1.9 --- php-src/ext/standard/tests/file/bug22414.phpt:1.8 Sun May 18 10:55:18 2003 +++ php-src/ext/standard/tests/file/bug22414.phpt Tue Jul 15 03:06:42 2003 @@ -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 @@ $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 {

« previous php.cvs (#22567) next »