1--TEST--
2oci_connect() without ORACLE_HOME set (OCIServerAttach() segfaults)
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}
14preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
15if (!isset($matches[0]) || !($matches[1] == 10 && $matches[2] == 2)) {
16    die ("skip tests a feature that works only with Oracle 10gR2 client");
17}
18?>
19--ENV--
20ORACLE_HOME=""
21--FILE--
22<?php
23
24require __DIR__."/details.inc";
25
26if (!empty($dbase)) {
27    var_dump(oci_connect($user, $password, $dbase));
28}
29else {
30    var_dump(oci_connect($user, $password));
31}
32
33?>
34--EXPECTF--
35Warning: 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
36bool(false)
37