1--TEST--
2oci_connect() without ORACLE_HOME set (OCIServerAttach() segfaults)
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8ob_start();
9phpinfo(INFO_MODULES);
10$phpinfo = ob_get_clean();
11$ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
12if ($ov != 1) {
13    die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
14}
15preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
16if (!(isset($matches[0]) &&
17    (($matches[1] == 11 && $matches[2] >= 2) ||
18     ($matches[1] >= 12)
19     ))) {
20    die("skip test expected to work only with Oracle 11gR2 or greater version of client");
21}
22?>
23--ENV--
24ORACLE_HOME=""
25--FILE--
26<?php
27
28require __DIR__."/details.inc";
29
30if (!empty($dbase)) {
31    var_dump(oci_connect($user, $password, $dbase));
32}
33else {
34    var_dump(oci_connect($user, $password));
35}
36
37?>
38--EXPECTF--
39Warning: 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
40
41Warning: oci_connect(): Error while trying to retrieve text for error ORA-01804
42 in %s on line %d
43bool(false)
44