1--TEST-- 2Bug #73962 bug with symlink related to cyrillic directory 3--SKIPIF-- 4<?php 5if(substr(PHP_OS, 0, 3) != 'WIN' ) { 6 die('skip windows only test'); 7} 8include_once __DIR__ . '/common.inc'; 9$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out); 10if (strpos($ret, 'privilege')) { 11 die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.'); 12} 13unlink('bug48746_tmp.lnk'); 14?> 15--FILE-- 16<?php 17include_once __DIR__ . '/common.inc'; 18$mountvol = get_mountvol(); 19$old_dir = __DIR__; 20$dirname = '"' . __DIR__ . "\\mnt\\test\\новая папка" . '"'; 21exec("mkdir " . $dirname, $output, $ret_val); 22chdir(__DIR__ . "\\mnt\\test"); 23$drive = substr(__DIR__, 0, 2); 24$pathwithoutdrive = substr(__DIR__, 2); 25$ret = exec($mountvol . " " . $drive . " /L", $output, $ret_val); 26exec("mklink /d mounted_volume " . $ret, $output, $ret_val); 27$fullpath = "mounted_volume" . $pathwithoutdrive; 28exec("mklink /d mklink_symlink \"новая папка\"", $output, $ret_val); 29file_put_contents("mklink_symlink\\a.php", "<?php echo \"I am included.\n\" ?>"); 30file_put_contents("$fullpath\\mnt\\test\\новая папка\\b.php", "<?php echo \"I am included.\n\" ?>"); 31var_dump(scandir("mklink_symlink")); 32var_dump(scandir("$fullpath\\mnt\\test\\новая папка")); 33var_dump(scandir("$fullpath\\mnt\\test\\mklink_symlink")); 34var_dump(is_readable("$fullpath\\mnt\\test\\mklink_symlink\b.php")); 35unlink("$fullpath\\mnt\\test\\новая папка\\b.php"); 36unlink("mklink_symlink\\a.php"); 37chdir($old_dir); 38rmdir(__DIR__ . "\\mnt\\test\\новая папка"); 39rmdir(__DIR__ . "\\mnt\\test\\mklink_symlink"); 40rmdir(__DIR__ . "\\mnt\\test\\mounted_volume"); 41rmdir(__DIR__ . "\\mnt\\test"); 42rmdir(__DIR__ . "\\mnt"); 43 44?> 45--EXPECT-- 46array(4) { 47 [0]=> 48 string(1) "." 49 [1]=> 50 string(2) ".." 51 [2]=> 52 string(5) "a.php" 53 [3]=> 54 string(5) "b.php" 55} 56array(4) { 57 [0]=> 58 string(1) "." 59 [1]=> 60 string(2) ".." 61 [2]=> 62 string(5) "a.php" 63 [3]=> 64 string(5) "b.php" 65} 66array(4) { 67 [0]=> 68 string(1) "." 69 [1]=> 70 string(2) ".." 71 [2]=> 72 string(5) "a.php" 73 [3]=> 74 string(5) "b.php" 75} 76bool(true) 77