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/imp_res_6.phpt ('Oracle Database 12c Implicit Result Sets: alternating oci_fetch_* calls')

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Initialization
6:
7:
$stmtarray = array(
8:     
"drop table imp_res_6_tab",
9:     
"create table imp_res_6_tab (c1 number, c2 varchar2(10))",
10:     
"insert into imp_res_6_tab values (1, 'a')",
11:     
"insert into imp_res_6_tab values (2, 'b')",
12:     
"insert into imp_res_6_tab values (3, 'c')",
13:     
"insert into imp_res_6_tab values (4, 'd')",
14:     
"insert into imp_res_6_tab values (5, 'e')",
15:     
"insert into imp_res_6_tab values (6, 'f')",
16:
17:     
"create or replace procedure imp_res_6_proc as
18:       c1 sys_refcursor;
19:     begin
20:       open c1 for select * from imp_res_6_tab order by 1;
21:       dbms_sql.return_result(c1);
22:     end;"
23:
);
24:
25:
oci8_test_sql_execute($c$stmtarray);
26:
27:
// Run Test
28:
29:
echo "Test 1\n";
30:
$s oci_parse($c"begin imp_res_6_proc(); end;");
31:
oci_execute($s);
32:
33:
$row oci_fetch_assoc($s);
34:
var_dump($row);
35:
$row oci_fetch_row($s);
36:
var_dump($row);
37:
$row oci_fetch_object($s);
38:
var_dump($row);
39:
$row oci_fetch_array($s);
40:
var_dump($row);
41:
$row oci_fetch_array($sOCI_NUM);
42:
var_dump($row);
43:
$row oci_fetch_array($sOCI_ASSOC);
44:
var_dump($row);
45:
46:
47:
// Clean up
48:
49:
$stmtarray = array(
50:     
"drop procedure imp_res_6_proc",
51:     
"drop table imp_res_6_tab",
52: );
53:
54:
oci8_test_sql_execute($c$stmtarray);
55:
56:
?>
57:
===DONE===
58:

Expected

Test 1
array(2) {
  ["C1"]=>
  string(1) "1"
  ["C2"]=>
  string(1) "a"
}
array(2) {
  [0]=>
  string(1) "2"
  [1]=>
  string(1) "b"
}
object(stdClass)#%d (2) {
  ["C1"]=>
  string(1) "3"
  ["C2"]=>
  string(1) "c"
}
array(4) {
  [0]=>
  string(1) "4"
  ["C1"]=>
  string(1) "4"
  [1]=>
  string(1) "d"
  ["C2"]=>
  string(1) "d"
}
array(2) {
  [0]=>
  string(1) "5"
  [1]=>
  string(1) "e"
}
array(2) {
  ["C1"]=>
  string(1) "6"
  ["C2"]=>
  string(1) "f"
}
===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:44:09
  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:44:09
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- Test 1
002- array(2) {
003-   ["C1"]=>
004-   string(1) "1"
005-   ["C2"]=>
006-   string(1) "a"
007- }
008- array(2) {
009-   [0]=>
010-   string(1) "2"
011-   [1]=>
012-   string(1) "b"
013- }
014- object(stdClass)#%d (2) {
015-   ["C1"]=>
016-   string(1) "3"
017-   ["C2"]=>
018-   string(1) "c"
019- }
020- array(4) {
021-   [0]=>
022-   string(1) "4"
023-   ["C1"]=>
024-   string(1) "4"
025-   [1]=>
026-   string(1) "d"
027-   ["C2"]=>
028-   string(1) "d"
029- }
030- array(2) {
031-   [0]=>
032-   string(1) "5"
033-   [1]=>
034-   string(1) "e"
035- }
036- array(2) {
037-   ["C1"]=>
038-   string(1) "6"
039-   ["C2"]=>
040-   string(1) "f"
041- }
042- ===DONE===

 

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

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