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_001.phpt ('oci_lob_write() and friends')

Script

1: <?php
2:     
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Initialization
6:
7:
$stmtarray = array(
8:     
"drop table lob_001_tab",
9:     
"create table lob_001_tab (id number, b1 blob)",
10: );
11:
12:
oci8_test_sql_execute($c$stmtarray);
13:
14: echo 
"Test 1 OCI_B_BLOB bind\n";
15:
16:
$statement oci_parse($c"insert into lob_001_tab (id, b1) values (1, empty_blob()) returning b1 into :v_b1 ");
17:
$blob oci_new_descriptor($c,OCI_D_LOB);
18:
var_dump(oci_bind_by_name($statement":v_b1"$blob, -1OCI_B_BLOB));
19:
oci_execute($statementOCI_DEFAULT);
20:
var_dump($blob);
21:
22: echo 
"Test 2\n";
23:
24:
var_dump($blob->write("test"));
25:
var_dump($blob->tell());
26:
var_dump($blob->seek(10OCI_SEEK_CUR));
27:
var_dump($blob->write("string"));
28:
var_dump($blob->flush());
29:
30:
oci_commit($c);
31:
32: echo 
"Test 3\n";
33:
34:
$s oci_parse($c"select b1 from lob_001_tab where id = 1");
35:
oci_execute($s);
36:
var_dump(oci_fetch_array($sOCI_RETURN_LOBS));
37:
38: echo 
"Test 4 SQLT_BLOB (an alias for OCI_B_BLOB) bind\n";
39:
40:
$statement oci_parse($c"insert into lob_001_tab (id, b1) values (2, empty_blob()) returning b1 into :v_b1 ");
41:
$blob oci_new_descriptor($c,OCI_D_LOB);
42:
var_dump(oci_bind_by_name($statement":v_b1"$blob, -1SQLT_BLOB));
43:
oci_execute($statementOCI_DEFAULT);
44:
var_dump($blob->write("test row 2"));
45:
46:
$s oci_parse($c"select b1 from lob_001_tab where id = 2");
47:
oci_execute($s);
48:
var_dump(oci_fetch_array($sOCI_RETURN_LOBS));
49:
50:
// Cleanup
51:
52:
$stmtarray = array(
53:     
"drop table lob_001_tab"
54:
);
55:
56:
oci8_test_sql_execute($c$stmtarray);
57:
58:
?>
59:
===DONE===
60:

Expected

Test 1 OCI_B_BLOB bind
bool(true)
object(OCI-Lob)#%d (1) {
  ["descriptor"]=>
  resource(%d) of type (oci8 descriptor)
}
Test 2
int(4)
int(4)
bool(true)
int(6)
bool(false)
Test 3
array(2) {
  [0]=>
  string(20) "teststring"
  ["B1"]=>
  string(20) "teststring"
}
Test 4 SQLT_BLOB (an alias for OCI_B_BLOB) bind
bool(true)
int(10)
array(2) {
  [0]=>
  string(10) "test row 2"
  ["B1"]=>
  string(10) "test row 2"
}
===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:50:50
  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:50:50
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 OCI_B_BLOB bind
002- bool(true)
003- object(OCI-Lob)#%d (1) {
004-   ["descriptor"]=>
005-   resource(%d) of type (oci8 descriptor)
006- }
007- Test 2
008- int(4)
009- int(4)
010- bool(true)
011- int(6)
012- bool(false)
013- Test 3
014- array(2) {
015-   [0]=>
016-   string(20) "teststring"
017-   ["B1"]=>
018-   string(20) "teststring"
019- }
020- Test 4 SQLT_BLOB (an alias for OCI_B_BLOB) bind
021- bool(true)
022- int(10)
023- array(2) {
024-   [0]=>
025-   string(10) "test row 2"
026-   ["B1"]=>
027-   string(10) "test row 2"
028- }
029- ===DONE===

 

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

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