bug47517.phpt 543 B

12345678910111213141516171819
  1. --TEST--
  2. Bug #47517 test registry virtualization disabled
  3. --SKIPIF--
  4. <?php
  5. if (substr(PHP_OS, 0, 3) != 'WIN') {
  6. die('skip only for Windows');
  7. }
  8. exec('net session 2>&1', $out, $status);
  9. if (!$status) {
  10. die('skip test runs under an elevated user account');
  11. }
  12. ?>
  13. --FILE--
  14. <?php
  15. /* This has to behave same way on both 64- and 32-bits. */
  16. file_put_contents('C:\Program Files\myfile.txt', 'hello');
  17. ?>
  18. --EXPECTF--
  19. Warning: file_put_contents(C:\Program Files\myfile.txt): Failed to open stream: Permission denied in %sbug47517.php on line %d