xref: /PHP-8.3/ext/oci8/tests/pecl_bug16035.phpt (revision 74859783)
1--TEST--
2PECL Bug #16035 (Crash with Oracle 10.2 connecting with a character set but ORACLE_HOME is not set)
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7ob_start();
8phpinfo(INFO_MODULES);
9$phpinfo = ob_get_clean();
10$ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
11if ($ov !== 1) {
12    die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
13}
14?>
15--ENV--
16ORACLE_HOME=""
17--FILE--
18<?php
19
20oci_connect('abc', 'def', 'ghi', 'jkl');
21
22?>
23--EXPECTF--
24Warning: 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
25
26Warning: oci_connect(): Error while trying to retrieve text for error ORA-01804
27 in %specl_bug16035.php on line %d
28