PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/oci8/tests/field_funcs3.phpt ('oci_field_*() family: basic column types')

Script

1: <?php
2:
3:
require(dirname(__FILE__)."/connect.inc");
4:
5:
// Initialization
6:
$stmtarray = array(
7:     
"drop table field_funcs3_tab",
8:     
"create table field_funcs3_tab(c1_c char(2), c2_v varchar2(2), c3_n number, c4_d date)",
9:     
"insert into field_funcs3_tab values ('c1', 'c2', 3, '01-Jan-2010')"
10:
);
11:
12:
$v oci_server_version($c);
13: if (
strpos($v'Oracle TimesTen') === false) {
14:     
oci8_test_sql_execute($c, array("alter session set nls_date_format = 'DD-MON-YYYY'"));
15: }
16:
oci8_test_sql_execute($c$stmtarray);
17:
18:
// Run Test
19:
20:
$select_sql "select * from field_funcs3_tab";
21:
22: if (!(
$s oci_parse($c$select_sql))) {
23:     die(
"oci_parse(select) failed!\n");
24: }
25:
26: if (!
oci_execute($s)) {
27:     die(
"oci_execute(select) failed!\n");
28: }
29:
30:
$row oci_fetch_array($sOCI_NUM OCI_RETURN_NULLS OCI_RETURN_LOBS);
31:
var_dump($row);
32:
33: foreach (
$row as $num => $field) {
34:     
$num++;
35:     
var_dump(oci_field_is_null($s$num));
36:     
var_dump(oci_field_name($s$num));
37:     
var_dump(oci_field_type($s$num));
38:     
var_dump(oci_field_type_raw($s$num));
39:     
var_dump(oci_field_scale($s$num));
40:     
var_dump(oci_field_precision($s$num));
41:     
var_dump(oci_field_size($s$num));
42: }
43:
44:
// Clean up
45:
46:
$stmtarray = array(
47:     
"drop table field_funcs3_tab"
48:
);
49:
50:
oci8_test_sql_execute($c$stmtarray);
51:
52:
?>
53:
===DONE===
54:

Expected

array(4) {
  [0]=>
  string(2) "c1"
  [1]=>
  string(2) "c2"
  [2]=>
  string(1) "3"
  [3]=>
  string(1%r[19]%r) "%r(01-JAN-2010|0001-01-20 10:00:00)%r"
}
bool(false)
string(4) "C1_C"
string(4) "CHAR"
int(96)
int(0)
int(0)
int(2)
bool(false)
string(4) "C2_V"
string(8) "VARCHAR2"
int(1)
int(0)
int(0)
int(2)
bool(false)
string(4) "C3_N"
string(6) "NUMBER"
int(2)
int(-127)
int(0)
int(22)
bool(false)
string(4) "C4_D"
string(4) "DATE"
int(12)
int(0)
int(0)
int(7)
===DONE===

Output

***********************************************************************
Fatal NI connect error 12541, connecting to:
 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=XE)(CID=(PROGRAM=php)(HOST=nex2.php.net)(USER=nlopess)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))

  VERSION INFORMATION:
	TNS for Linux: Version 11.2.0.2.0 - Beta
	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Beta
  Time: 17-JUN-2018 05:42:12
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12541
    TNS-12541: TNS:no listener
    ns secondary err code: 12560
    nt main err code: 511
    TNS-00511: No listener

Fatal error: connect.inc: Failed to connect as 'system' to 'localhost/XE': ORA-12541: TNS:no listener in /var/php_gcov/PHP_HEAD/ext/oci8/tests/connect.inc on line 14
    nt secondary err code: 111
    nt OS err code: 0

Diff

001+ ***********************************************************************
002+ Fatal NI connect error 12541, connecting to:
003+  (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=XE)(CID=(PROGRAM=php)(HOST=nex2.php.net)(USER=nlopess)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
004+ 
005+   VERSION INFORMATION:
006+ 	TNS for Linux: Version 11.2.0.2.0 - Beta
007+ 	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Beta
008+   Time: 17-JUN-2018 05:42:12
009+   Tracing not turned on.
010+   Tns error struct:
011+     ns main err code: 12541
012+     TNS-12541: TNS:no listener
013+     ns secondary err code: 12560
014+     nt main err code: 511
015+     TNS-00511: No listener
016+ 
017+ Fatal error: connect.inc: Failed to connect as 'system' to 'localhost/XE': ORA-12541: TNS:no listener in /var/php_gcov/PHP_HEAD/ext/oci8/tests/connect.inc on line 14
018+     nt secondary err code: 111
019+     nt OS err code: 0
001- array(4) {
002-   [0]=>
003-   string(2) "c1"
004-   [1]=>
005-   string(2) "c2"
006-   [2]=>
007-   string(1) "3"
008-   [3]=>
009-   string(1%r[19]%r) "%r(01-JAN-2010|0001-01-20 10:00:00)%r"
010- }
011- bool(false)
012- string(4) "C1_C"
013- string(4) "CHAR"
014- int(96)
015- int(0)
016- int(0)
017- int(2)
018- bool(false)
019- string(4) "C2_V"
020- string(8) "VARCHAR2"
021- int(1)
022- int(0)
023- int(0)
024- int(2)
025- bool(false)
026- string(4) "C3_N"
027- string(6) "NUMBER"
028- int(2)
029- int(-127)
030- int(0)
031- int(22)
032- bool(false)
033- string(4) "C4_D"
034- string(4) "DATE"
035- int(12)
036- int(0)
037- int(0)
038- int(7)
039- ===DONE===

 

Generated at Mon, 18 Jun 2018 17:33:50 +0000 (20 hours ago)

Copyright © 2005-2018 The PHP Group
All rights reserved.