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/lob_018.phpt ('fetching the same lob several times')

Script

1: <?php
2:     
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Initialization
6:
7:
$stmtarray = array(
8:     
"drop table lob_018_tab",
9:     
"create table lob_018_tab (mykey number, lob_1 clob)",
10: );
11:
12:
oci8_test_sql_execute($c$stmtarray);
13:
14: echo 
"Test 1\n";
15:
16:
$init "insert into lob_018_tab (mykey, lob_1) values(1, empty_clob()) returning lob_1 into :mylob";
17:
$statement oci_parse($c$init);
18:
$clob oci_new_descriptor($cOCI_D_LOB);
19:
oci_bind_by_name($statement":mylob"$clob, -1OCI_B_CLOB);
20:
oci_execute($statementOCI_DEFAULT);
21:
$clob->save("data");
22:
23:
oci_commit($c);
24:
25:
$init "insert into lob_018_tab (mykey, lob_1) values(2, empty_clob()) returning lob_1 into :mylob";
26:
$statement oci_parse($c$init);
27:
$clob oci_new_descriptor($cOCI_D_LOB);
28:
oci_bind_by_name($statement":mylob"$clob, -1OCI_B_CLOB);
29:
oci_execute($statementOCI_DEFAULT);
30:
$clob->save("long data");
31:
32:
oci_commit($c);
33:
34:
35:
$query 'select * from lob_018_tab order by mykey asc';
36:
$statement oci_parse ($c$query);
37:
oci_execute($statementOCI_DEFAULT);
38:
39: while (
$row oci_fetch_array($statementOCI_ASSOC)) {
40:     
$result $row['LOB_1']->load();
41:     
var_dump($result);
42: }
43:
44: echo 
"Test 2\n";
45:
46:
$query 'select * from lob_018_tab order by mykey desc';
47:
$statement oci_parse ($c$query);
48:
oci_execute($statementOCI_DEFAULT);
49:
50: while (
$row oci_fetch_array($statementOCI_ASSOC)) {
51:     
$result $row['LOB_1']->load();
52:     
var_dump($result);
53: }
54:
55: echo 
"Test 3 - bind with SQLT_CLOB (an alias for OCI_B_CLOB)\n";
56:
57:
$init "insert into lob_018_tab (mykey, lob_1) values(3, empty_clob()) returning lob_1 into :mylob";
58:
$statement oci_parse($c$init);
59:
$clob oci_new_descriptor($cOCI_D_LOB);
60:
oci_bind_by_name($statement":mylob"$clob, -1SQLT_CLOB);
61:
oci_execute($statementOCI_DEFAULT);
62:
$clob->save("more stuff");
63:
64:
oci_commit($c);
65:
66:
$query 'select * from lob_018_tab where mykey = 3';
67:
$statement oci_parse ($c$query);
68:
oci_execute($statementOCI_DEFAULT);
69:
70: while (
$row oci_fetch_array($statementOCI_ASSOC)) {
71:     
$result $row['LOB_1']->load();
72:     
var_dump($result);
73: }
74:
75:
// Cleanup
76:
77:
$stmtarray = array(
78:     
"drop table lob_018_tab"
79:
);
80:
81:
oci8_test_sql_execute($c$stmtarray);
82:
83:
?>
84:
===DONE===
85:

Expected

Test 1
string(4) "data"
string(9) "long data"
Test 2
string(9) "long data"
string(4) "data"
Test 3 - bind with SQLT_CLOB (an alias for OCI_B_CLOB)
string(10) "more stuff"
===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:55:03
  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:55:03
009+   Tracing not turned on.
001- Test 1
002- string(4) "data"
003- string(9) "long data"
004- Test 2
005- string(9) "long data"
006- string(4) "data"
007- Test 3 - bind with SQLT_CLOB (an alias for OCI_B_CLOB)
008- string(10) "more stuff"
009- ===DONE===
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

 

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

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