1--TEST-- 2openbase_dir runtime hardening 3--SKIPIF-- 4<?php 5if(PHP_OS_FAMILY === "Windows") { 6 die('skip.. only for unix'); 7} 8if (!is_dir("/usr/local/bin")) { 9 die('skip.. no /usr/local/bin on this machine'); 10} 11?> 12--INI-- 13open_basedir=/usr/local 14--FILE-- 15<?php 16var_dump(ini_set("open_basedir", "/usr/local/bin")); 17var_dump(ini_get("open_basedir")); 18var_dump(ini_set("open_basedir", "/usr")); 19var_dump(ini_get("open_basedir")); 20?> 21--EXPECT-- 22string(10) "/usr/local" 23string(14) "/usr/local/bin" 24bool(false) 25string(14) "/usr/local/bin" 26