1--TEST-- 2oci_connect() without ORACLE_HOME set (OCIServerAttach() segfaults) 3--SKIPIF-- 4<?php 5if (!extension_loaded('oci8')) die("skip no oci8 extension"); 6ob_start(); 7phpinfo(INFO_MODULES); 8$phpinfo = ob_get_clean(); 9$ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo); 10if ($ov !== 1) { 11 die ("skip Test only valid when OCI8 is built with an ORACLE_HOME"); 12} 13preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches); 14if (!isset($matches[0]) || !($matches[1] == 10 && $matches[2] == 2)) { 15 die ("skip tests a feature that works only with Oracle 10gR2 client"); 16} 17?> 18--ENV-- 19ORACLE_HOME="" 20--FILE-- 21<?php 22 23require dirname(__FILE__)."/details.inc"; 24 25if (!empty($dbase)) { 26 var_dump(oci_connect($user, $password, $dbase)); 27} 28else { 29 var_dump(oci_connect($user, $password)); 30} 31 32?> 33===DONE=== 34<?php exit(0); ?> 35--EXPECTF-- 36Warning: 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 37bool(false) 38===DONE=== 39