1--TEST-- 2Test session_save_path() function : variation 3--EXTENSIONS-- 4session 5--SKIPIF-- 6<?php include('skipif.inc'); 7if(substr(PHP_OS, 0, 3) == "WIN") 8 die("skip Not for Windows"); 9?> 10--INI-- 11session.save_handler=files 12session.save_path= 13session.name=PHPSESSID 14--FILE-- 15<?php 16 17ob_start(); 18echo "*** Testing session_save_path() : variation ***\n"; 19$directory = __DIR__; 20$sessions = ($directory."/session_save_path_variation5"); 21 22chdir($directory); 23ini_set('open_basedir', '.'); 24// Delete the existing directory 25if (file_exists($sessions) === TRUE) { 26 @rmdir($sessions); 27} 28 29var_dump(mkdir($sessions)); 30var_dump(chdir($sessions)); 31ini_set("session.save_path", $directory); 32var_dump(session_save_path()); 33 34echo "Done"; 35ob_end_flush(); 36?> 37--CLEAN-- 38<?php 39$directory = __DIR__; 40$sessions = ($directory."/session_save_path_variation5"); 41rmdir($sessions); 42?> 43--EXPECTF-- 44*** Testing session_save_path() : variation *** 45bool(true) 46bool(true) 47 48Warning: ini_set(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (.) in %s on line %d 49string(0) "" 50Done 51