if(substr(PHP_OS, 0, 3) != 'WIN' ) {\r
die('skip windows only test');\r
}\r
-$cmd = "mklink.exe /?";\r
-$ret = @exec($cmd, $output, $return_val);\r
-if (count($output) == 0) {\r
- die("mklink.exe not found in PATH");\r
+$ret = exec('mklink bug48746_tmp.lnk ' . __FILE__ .' 2>&1', $out);\r
+if (strpos($ret, 'privilege')) {\r
+ die('skip. SeCreateSymbolicLinkPrivilege not enable for this user.');\r
}\r
+unlink('mklink bug48746_tmp.lnk');\r
?>\r
--FILE--\r
<?php\r
[1] => ..\r
[2] => a.php\r
[3] => b.php\r
-)
+)\r
--SKIPIF--\r
<?php\r
if(substr(PHP_OS, 0, 3) != 'WIN' ) {\r
- die('skip windows only test');\r
+ die('skip windows only test');\r
}\r
-$cmd = "junction.exe /?";\r
-$ret = @exec($cmd, $output, $return_val);\r
-if (count($output) == 0) {\r
- die("junction.exe not found in PATH");\r
+$ret = exec('junction /? 2>&1', $out);\r
+if (strpos($out[0], 'recognized')) {\r
+ die('skip. junction.exe not found in PATH.');\r
}\r
+\r
?>\r
--FILE--\r
<?php\r
[1] => ..\r
[2] => a.php\r
[3] => b.php\r
-)
+)\r