pecl_bug16035.phpt 764 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. PECL Bug #16035 (Crash with Oracle 10.2 connecting with a character set but ORACLE_HOME is not set)
  3. --EXTENSIONS--
  4. oci8
  5. --SKIPIF--
  6. <?php
  7. ob_start();
  8. phpinfo(INFO_MODULES);
  9. $phpinfo = ob_get_clean();
  10. $ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
  11. if ($ov !== 1) {
  12. die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
  13. }
  14. ?>
  15. --ENV--
  16. ORACLE_HOME=""
  17. --FILE--
  18. <?php
  19. oci_connect('abc', 'def', 'ghi', 'jkl');
  20. ?>
  21. --EXPECTF--
  22. Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and %s are set and point to the right directories in %s on line %d
  23. Warning: oci_connect(): Error while trying to retrieve text for error ORA-01804
  24. in %specl_bug16035.php on line %d