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_array.phpt ('oci_fetch_array()')

Script

1: <?php
2:
3:
require dirname(__FILE__)."/connect.inc";
4: require 
dirname(__FILE__).'/create_table.inc';
5:
6:
$insert_sql "INSERT INTO ".$schema."".$table_name." (id, value) VALUES (1,1)";
7:
8: if (!(
$s oci_parse($c$insert_sql))) {
9:     die(
"oci_parse(insert) failed!\n");
10: }
11:
12: for (
$i 0$i<3$i++) {
13:     if (!
oci_execute($s)) {
14:         die(
"oci_execute(insert) failed!\n");
15:     }
16: }
17:
18: if (!
oci_commit($c)) {
19:     die(
"oci_commit() failed!\n");
20: }
21:
22: echo 
"Test 1\n";
23:
24:
$select_sql "SELECT * FROM ".$schema."".$table_name."";
25:
26: if (!(
$s oci_parse($c$select_sql))) {
27:     die(
"oci_parse(select) failed!\n");
28: }
29:
30: if (!
oci_execute($s)) {
31:     die(
"oci_execute(select) failed!\n");
32: }
33: while (
$row oci_fetch_array($s)) {
34:     
var_dump($row);
35: }
36:
37: echo 
"Test 2\n";
38:
39: if (!
oci_execute($s)) {
40:     die(
"oci_execute(select) failed!\n");
41: }
42: while (
$row oci_fetch_array($sOCI_NUM)) {
43:     
var_dump($row);
44: }
45:
46: echo 
"Test 3\n";
47:
48: if (!
oci_execute($s)) {
49:     die(
"oci_execute(select) failed!\n");
50: }
51: while (
$row oci_fetch_array($sOCI_ASSOC)) {
52:     
var_dump($row);
53: }
54:
55: echo 
"Test 4\n";
56:
57: if (!
oci_execute($s)) {
58:     die(
"oci_execute(select) failed!\n");
59: }
60: while (
$row oci_fetch_array($sOCI_BOTH)) {
61:     
var_dump($row);
62: }
63:
64: echo 
"Test 5\n";
65:
66: if (!
oci_execute($s)) {
67:     die(
"oci_execute(select) failed!\n");
68: }
69: while (
$row oci_fetch_array($sOCI_RETURN_LOBS)) {
70:     
var_dump($row);
71: }
72:
73: echo 
"Test 6\n";
74:
75: if (!
oci_execute($s)) {
76:     die(
"oci_execute(select) failed!\n");
77: }
78: while (
$row oci_fetch_array($sOCI_RETURN_NULLS)) {
79:     
var_dump($row);
80: }
81:
82: echo 
"Test 7\n";
83:
84: if (!
oci_execute($s)) {
85:     die(
"oci_execute(select) failed!\n");
86: }
87: while (
$row oci_fetch_array($sOCI_NUM+OCI_RETURN_NULLS)) {
88:     
var_dump($row);
89: }
90:
91: require 
dirname(__FILE__).'/drop_table.inc';
92:     
93: echo 
"Done\n";
94:
?>
95:

Expected

Test 1
array(10) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
  [2]=>
  NULL
  ["BLOB"]=>
  NULL
  [3]=>
  NULL
  ["CLOB"]=>
  NULL
  [4]=>
  NULL
  ["STRING"]=>
  NULL
}
array(10) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
  [2]=>
  NULL
  ["BLOB"]=>
  NULL
  [3]=>
  NULL
  ["CLOB"]=>
  NULL
  [4]=>
  NULL
  ["STRING"]=>
  NULL
}
array(10) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
  [2]=>
  NULL
  ["BLOB"]=>
  NULL
  [3]=>
  NULL
  ["CLOB"]=>
  NULL
  [4]=>
  NULL
  ["STRING"]=>
  NULL
}
Test 2
array(2) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "1"
}
array(2) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "1"
}
array(2) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "1"
}
Test 3
array(2) {
  ["ID"]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
}
array(2) {
  ["ID"]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
}
array(2) {
  ["ID"]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
}
Test 4
array(4) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
}
array(4) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
}
array(4) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
}
Test 5
array(4) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
}
array(4) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
}
array(4) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
}
Test 6
array(10) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
  [2]=>
  NULL
  ["BLOB"]=>
  NULL
  [3]=>
  NULL
  ["CLOB"]=>
  NULL
  [4]=>
  NULL
  ["STRING"]=>
  NULL
}
array(10) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
  [2]=>
  NULL
  ["BLOB"]=>
  NULL
  [3]=>
  NULL
  ["CLOB"]=>
  NULL
  [4]=>
  NULL
  ["STRING"]=>
  NULL
}
array(10) {
  [0]=>
  string(1) "1"
  ["ID"]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  ["VALUE"]=>
  string(1) "1"
  [2]=>
  NULL
  ["BLOB"]=>
  NULL
  [3]=>
  NULL
  ["CLOB"]=>
  NULL
  [4]=>
  NULL
  ["STRING"]=>
  NULL
}
Test 7
array(5) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  [2]=>
  NULL
  [3]=>
  NULL
  [4]=>
  NULL
}
array(5) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  [2]=>
  NULL
  [3]=>
  NULL
  [4]=>
  NULL
}
array(5) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "1"
  [2]=>
  NULL
  [3]=>
  NULL
  [4]=>
  NULL
}
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:58
  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:58
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(10) {
003-   [0]=>
004-   string(1) "1"
005-   ["ID"]=>
006-   string(1) "1"
007-   [1]=>
008-   string(1) "1"
009-   ["VALUE"]=>
010-   string(1) "1"
011-   [2]=>
012-   NULL
013-   ["BLOB"]=>
014-   NULL
015-   [3]=>
016-   NULL
017-   ["CLOB"]=>
018-   NULL
019-   [4]=>
020-   NULL
021-   ["STRING"]=>
022-   NULL
023- }
024- array(10) {
025-   [0]=>
026-   string(1) "1"
027-   ["ID"]=>
028-   string(1) "1"
029-   [1]=>
030-   string(1) "1"
031-   ["VALUE"]=>
032-   string(1) "1"
033-   [2]=>
034-   NULL
035-   ["BLOB"]=>
036-   NULL
037-   [3]=>
038-   NULL
039-   ["CLOB"]=>
040-   NULL
041-   [4]=>
042-   NULL
043-   ["STRING"]=>
044-   NULL
045- }
046- array(10) {
047-   [0]=>
048-   string(1) "1"
049-   ["ID"]=>
050-   string(1) "1"
051-   [1]=>
052-   string(1) "1"
053-   ["VALUE"]=>
054-   string(1) "1"
055-   [2]=>
056-   NULL
057-   ["BLOB"]=>
058-   NULL
059-   [3]=>
060-   NULL
061-   ["CLOB"]=>
062-   NULL
063-   [4]=>
064-   NULL
065-   ["STRING"]=>
066-   NULL
067- }
068- Test 2
069- array(2) {
070-   [0]=>
071-   string(1) "1"
072-   [1]=>
073-   string(1) "1"
074- }
075- array(2) {
076-   [0]=>
077-   string(1) "1"
078-   [1]=>
079-   string(1) "1"
080- }
081- array(2) {
082-   [0]=>
083-   string(1) "1"
084-   [1]=>
085-   string(1) "1"
086- }
087- Test 3
088- array(2) {
089-   ["ID"]=>
090-   string(1) "1"
091-   ["VALUE"]=>
092-   string(1) "1"
093- }
094- array(2) {
095-   ["ID"]=>
096-   string(1) "1"
097-   ["VALUE"]=>
098-   string(1) "1"
099- }
100- array(2) {
101-   ["ID"]=>
102-   string(1) "1"
103-   ["VALUE"]=>
104-   string(1) "1"
105- }
106- Test 4
107- array(4) {
108-   [0]=>
109-   string(1) "1"
110-   ["ID"]=>
111-   string(1) "1"
112-   [1]=>
113-   string(1) "1"
114-   ["VALUE"]=>
115-   string(1) "1"
116- }
117- array(4) {
118-   [0]=>
119-   string(1) "1"
120-   ["ID"]=>
121-   string(1) "1"
122-   [1]=>
123-   string(1) "1"
124-   ["VALUE"]=>
125-   string(1) "1"
126- }
127- array(4) {
128-   [0]=>
129-   string(1) "1"
130-   ["ID"]=>
131-   string(1) "1"
132-   [1]=>
133-   string(1) "1"
134-   ["VALUE"]=>
135-   string(1) "1"
136- }
137- Test 5
138- array(4) {
139-   [0]=>
140-   string(1) "1"
141-   ["ID"]=>
142-   string(1) "1"
143-   [1]=>
144-   string(1) "1"
145-   ["VALUE"]=>
146-   string(1) "1"
147- }
148- array(4) {
149-   [0]=>
150-   string(1) "1"
151-   ["ID"]=>
152-   string(1) "1"
153-   [1]=>
154-   string(1) "1"
155-   ["VALUE"]=>
156-   string(1) "1"
157- }
158- array(4) {
159-   [0]=>
160-   string(1) "1"
161-   ["ID"]=>
162-   string(1) "1"
163-   [1]=>
164-   string(1) "1"
165-   ["VALUE"]=>
166-   string(1) "1"
167- }
168- Test 6
169- array(10) {
170-   [0]=>
171-   string(1) "1"
172-   ["ID"]=>
173-   string(1) "1"
174-   [1]=>
175-   string(1) "1"
176-   ["VALUE"]=>
177-   string(1) "1"
178-   [2]=>
179-   NULL
180-   ["BLOB"]=>
181-   NULL
182-   [3]=>
183-   NULL
184-   ["CLOB"]=>
185-   NULL
186-   [4]=>
187-   NULL
188-   ["STRING"]=>
189-   NULL
190- }
191- array(10) {
192-   [0]=>
193-   string(1) "1"
194-   ["ID"]=>
195-   string(1) "1"
196-   [1]=>
197-   string(1) "1"
198-   ["VALUE"]=>
199-   string(1) "1"
200-   [2]=>
201-   NULL
202-   ["BLOB"]=>
203-   NULL
204-   [3]=>
205-   NULL
206-   ["CLOB"]=>
207-   NULL
208-   [4]=>
209-   NULL
210-   ["STRING"]=>
211-   NULL
212- }
213- array(10) {
214-   [0]=>
215-   string(1) "1"
216-   ["ID"]=>
217-   string(1) "1"
218-   [1]=>
219-   string(1) "1"
220-   ["VALUE"]=>
221-   string(1) "1"
222-   [2]=>
223-   NULL
224-   ["BLOB"]=>
225-   NULL
226-   [3]=>
227-   NULL
228-   ["CLOB"]=>
229-   NULL
230-   [4]=>
231-   NULL
232-   ["STRING"]=>
233-   NULL
234- }
235- Test 7
236- array(5) {
237-   [0]=>
238-   string(1) "1"
239-   [1]=>
240-   string(1) "1"
241-   [2]=>
242-   NULL
243-   [3]=>
244-   NULL
245-   [4]=>
246-   NULL
247- }
248- array(5) {
249-   [0]=>
250-   string(1) "1"
251-   [1]=>
252-   string(1) "1"
253-   [2]=>
254-   NULL
255-   [3]=>
256-   NULL
257-   [4]=>
258-   NULL
259- }
260- array(5) {
261-   [0]=>
262-   string(1) "1"
263-   [1]=>
264-   string(1) "1"
265-   [2]=>
266-   NULL
267-   [3]=>
268-   NULL
269-   [4]=>
270-   NULL
271- }
272- Done

 

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

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