]> granicus.if.org Git - php/commitdiff
MFH
authorfoobar <sniper@php.net>
Tue, 15 Jul 2003 07:06:52 +0000 (07:06 +0000)
committerfoobar <sniper@php.net>
Tue, 15 Jul 2003 07:06:52 +0000 (07:06 +0000)
ext/standard/tests/file/bug22414.phpt

index 8847ded2b85345b7f38ed5f4920e48017daf3365..f6effd272c298fc486d97a97cefc01b43b73a7c0 100644 (file)
@@ -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 {