extauth_04.phpt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --TEST--
  2. Test External Authentication errors on Windows
  3. --EXTENSIONS--
  4. oci8
  5. --SKIPIF--
  6. <?php
  7. if (substr(PHP_OS, 0, 3) != 'WIN') die("skip this test is for Windows platforms only");
  8. ?>
  9. --INI--
  10. oci8.privileged_connect=1
  11. --FILE--
  12. <?php
  13. echo "Test 1\n";
  14. $c = oci_connect('/', '', 'anything', null, OCI_CRED_EXT);
  15. if (!$c) {
  16. $m = oci_error();
  17. var_dump($m);
  18. }
  19. var_dump($c);
  20. echo "Test 2\n";
  21. $c = oci_new_connect('/', '', 'anything', null, OCI_CRED_EXT);
  22. if (!$c) {
  23. $m = oci_error();
  24. var_dump($m);
  25. }
  26. var_dump($c);
  27. echo "Test 3\n";
  28. $c = oci_pconnect('/', '', 'anything', null, OCI_CRED_EXT);
  29. if (!$c) {
  30. $m = oci_error();
  31. var_dump($m);
  32. }
  33. var_dump($c);
  34. ?>
  35. --EXPECTF--
  36. Test 1
  37. Warning: oci_connect(): External Authentication is not supported on Windows in %s on line %d
  38. bool(false)
  39. bool(false)
  40. Test 2
  41. Warning: oci_new_connect(): External Authentication is not supported on Windows in %s on line %d
  42. bool(false)
  43. bool(false)
  44. Test 3
  45. Warning: oci_pconnect(): External Authentication is not supported on Windows in %s on line %d
  46. bool(false)
  47. bool(false)