Annotation of embedaddon/php/tests/security/open_basedir_error_log.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test open_basedir configuration
                      3: --INI--
                      4: open_basedir=.
                      5: error_log=
                      6: --FILE--
                      7: <?php
                      8: require_once "open_basedir.inc";
                      9: $initdir = getcwd();
                     10: test_open_basedir_before("error_log");
                     11: 
                     12: 
                     13: var_dump(ini_set("error_log", $initdir."/test/bad/bad.txt"));
                     14: var_dump(ini_set("error_log", $initdir."/test/bad.txt"));
                     15: var_dump(ini_set("error_log", $initdir."/bad.txt"));
                     16: var_dump(ini_set("error_log", $initdir."/test/ok/ok.txt"));
                     17: var_dump(ini_set("error_log", $initdir."/test/ok/ok.txt"));
                     18: 
                     19: test_open_basedir_after("error_log");
                     20: ?>
                     21: --CLEAN--
                     22: <?php
                     23: require_once "open_basedir.inc";
                     24: delete_directories();
                     25: ?>
                     26: --EXPECTF--
                     27: *** Testing open_basedir configuration [error_log] ***
                     28: bool(true)
                     29: bool(true)
                     30: bool(true)
                     31: bool(true)
                     32: bool(true)
                     33: 
                     34: Warning: ini_set(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
                     35: bool(false)
                     36: 
                     37: Warning: ini_set(): open_basedir restriction in effect. File(%s/test/bad.txt) is not within the allowed path(s): (.) in %s on line %d
                     38: bool(false)
                     39: 
                     40: Warning: ini_set(): open_basedir restriction in effect. File(%s/bad.txt) is not within the allowed path(s): (.) in %s on line %d
                     41: bool(false)
                     42: string(0) ""
                     43: string(%d) "%s/test/ok/ok.txt"
                     44: *** Finished testing open_basedir configuration [error_log] ***
                     45: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>