1--TEST-- 2Test open_basedir configuration 3--INI-- 4open_basedir=. 5--SKIPIF-- 6<?php 7if(PHP_OS_FAMILY !== "Windows") { 8 die('skip Windows only variation'); 9} 10?> 11--FILE-- 12<?php 13require_once "open_basedir.inc"; 14test_open_basedir_before("parse_ini_file"); 15$directory = dirname(__FILE__); 16 17var_dump(parse_ini_file("../bad")); 18var_dump(parse_ini_file("../bad/bad.txt")); 19var_dump(parse_ini_file("..")); 20var_dump(parse_ini_file("../")); 21var_dump(parse_ini_file("../bad/.")); 22var_dump(parse_ini_file("../bad/./bad.txt")); 23var_dump(parse_ini_file("./../.")); 24 25test_open_basedir_after("parse_ini_file"); 26?> 27--CLEAN-- 28<?php 29require_once "open_basedir.inc"; 30delete_directories(); 31?> 32--EXPECTF-- 33*** Testing open_basedir configuration [parse_ini_file] *** 34bool(true) 35bool(true) 36bool(true) 37bool(true) 38bool(true) 39 40Warning: parse_ini_file(): open_basedir restriction in effect. File(%stest\bad) is not within the allowed path(s): (.) in %sopen_basedir_parse_ini_file.php on line 6 41 42Warning: parse_ini_file(%stest\bad): failed to open stream: Operation not permitted in %sopen_basedir_parse_ini_file.php on line 6 43bool(false) 44 45Warning: parse_ini_file(): open_basedir restriction in effect. File(%stest\bad\bad.txt) is not within the allowed path(s): (.) in %sopen_basedir_parse_ini_file.php on line 7 46 47Warning: parse_ini_file(%stest\bad\bad.txt): failed to open stream: Operation not permitted in %sopen_basedir_parse_ini_file.php on line 7 48bool(false) 49 50Warning: parse_ini_file(): open_basedir restriction in effect. File(%stest) is not within the allowed path(s): (.) in %sopen_basedir_parse_ini_file.php on line 8 51 52Warning: parse_ini_file(%stest): failed to open stream: Operation not permitted in %sopen_basedir_parse_ini_file.php on line 8 53bool(false) 54 55Warning: parse_ini_file(): open_basedir restriction in effect. File(%stest) is not within the allowed path(s): (.) in %sopen_basedir_parse_ini_file.php on line 9 56 57Warning: parse_ini_file(%stest): failed to open stream: Operation not permitted in %sopen_basedir_parse_ini_file.php on line 9 58bool(false) 59 60Warning: parse_ini_file(): open_basedir restriction in effect. File(%stest\bad) is not within the allowed path(s): (.) in %sopen_basedir_parse_ini_file.php on line 10 61 62Warning: parse_ini_file(%stest\bad): failed to open stream: Operation not permitted in %sopen_basedir_parse_ini_file.php on line 10 63bool(false) 64 65Warning: parse_ini_file(): open_basedir restriction in effect. File(%stest\bad\bad.txt) is not within the allowed path(s): (.) in %sopen_basedir_parse_ini_file.php on line 11 66 67Warning: parse_ini_file(%stest\bad\bad.txt): failed to open stream: Operation not permitted in %sopen_basedir_parse_ini_file.php on line 11 68bool(false) 69 70Warning: parse_ini_file(): open_basedir restriction in effect. File(%stest) is not within the allowed path(s): (.) in %sopen_basedir_parse_ini_file.php on line 12 71 72Warning: parse_ini_file(%stest): failed to open stream: Operation not permitted in %sopen_basedir_parse_ini_file.php on line 12 73bool(false) 74*** Finished testing open_basedir configuration [parse_ini_file] *** 75