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/fetch_all5.phpt ('Test oci_fetch_all with 0 and -1 skip & maxrows')

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Initialization
6:
7:
$stmtarray = array(
8:     
"drop table fetch_all5_tab",
9:     
"create table fetch_all5_tab (mycol1 number, mycol2 varchar2(20))",
10:     
"insert into fetch_all5_tab values (1, 'abc')",
11:     
"insert into fetch_all5_tab values (2, 'def')",
12:     
"insert into fetch_all5_tab values (3, 'ghi')"
13:
);
14:
15:
oci8_test_sql_execute($c$stmtarray);
16:
17:
// Run Test
18:
19:
echo "Test 1\n";
20:
21:
$s oci_parse($c"select * from fetch_all5_tab order by 1");
22:
oci_execute($s);
23:
$r oci_fetch_all($s$res0, -1);
24:
var_dump($r);
25:
var_dump($res);
26:
27: echo 
"Test 1\n";
28:
29:
$s oci_parse($c"select * from fetch_all5_tab order by 1");
30:
oci_execute($s);
31:
$r oci_fetch_all($s$res00);
32:
var_dump($r);
33:
var_dump($res);
34:
35: echo 
"Test 3\n";
36:
37:
$s oci_parse($c"select * from fetch_all5_tab order by 1");
38:
oci_execute($s);
39:
$r oci_fetch_all($s$res, -10);
40:
var_dump($r);
41:
var_dump($res);
42:
43:
// Clean up
44:
45:
$stmtarray = array(
46:     
"drop table fetch_all5_tab"
47:
);
48:
49:
oci8_test_sql_execute($c$stmtarray);
50:
51:
oci_close($c);
52:
53:
?>
54:
===DONE===
55:

Expected

Test 1
int(3)
array(2) {
  ["MYCOL1"]=>
  array(3) {
    [0]=>
    string(1) "1"
    [1]=>
    string(1) "2"
    [2]=>
    string(1) "3"
  }
  ["MYCOL2"]=>
  array(3) {
    [0]=>
    string(3) "abc"
    [1]=>
    string(3) "def"
    [2]=>
    string(3) "ghi"
  }
}
Test 1
int(3)
array(2) {
  ["MYCOL1"]=>
  array(3) {
    [0]=>
    string(1) "1"
    [1]=>
    string(1) "2"
    [2]=>
    string(1) "3"
  }
  ["MYCOL2"]=>
  array(3) {
    [0]=>
    string(3) "abc"
    [1]=>
    string(3) "def"
    [2]=>
    string(3) "ghi"
  }
}
Test 3
int(0)
array(0) {
}
===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:38:43
  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:38:43
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- int(3)
003- array(2) {
004-   ["MYCOL1"]=>
005-   array(3) {
006-     [0]=>
007-     string(1) "1"
008-     [1]=>
009-     string(1) "2"
010-     [2]=>
011-     string(1) "3"
012-   }
013-   ["MYCOL2"]=>
014-   array(3) {
015-     [0]=>
016-     string(3) "abc"
017-     [1]=>
018-     string(3) "def"
019-     [2]=>
020-     string(3) "ghi"
021-   }
022- }
023- Test 1
024- int(3)
025- array(2) {
026-   ["MYCOL1"]=>
027-   array(3) {
028-     [0]=>
029-     string(1) "1"
030-     [1]=>
031-     string(1) "2"
032-     [2]=>
033-     string(1) "3"
034-   }
035-   ["MYCOL2"]=>
036-   array(3) {
037-     [0]=>
038-     string(3) "abc"
039-     [1]=>
040-     string(3) "def"
041-     [2]=>
042-     string(3) "ghi"
043-   }
044- }
045- Test 3
046- int(0)
047- array(0) {
048- }
049- ===DONE===

 

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

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