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

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
// Initialization
6:
7:
$stmtarray = array(
8:     
"drop table lob_002_tab",
9:     
"create table lob_002_tab (id number, b1 BLOB)",
10: );
11:
12:
oci8_test_sql_execute($c$stmtarray);
13:
14:
$statement oci_parse($c"insert into lob_002_tab (id, b1) values (1, empty_blob()) returning b1 INTO :v_blob ");
15:
$blob oci_new_descriptor($c,OCI_D_LOB);
16:
oci_bind_by_name($statement,":v_blob"$blob,-1,OCI_B_BLOB);
17:
oci_execute($statementOCI_DEFAULT);
18:
19:
var_dump($blob);
20:
21:
var_dump($blob->write("test", -1));
22:
var_dump($blob->write("test""str"));
23:
var_dump($blob->write("test"1000000));
24:
var_dump($blob->write(str_repeat("test"10000), 1000000));
25:
var_dump($blob->tell());
26:
var_dump($blob->seek("str", -5));
27:
var_dump($blob->flush());
28:
29:
oci_commit($c);
30:
31:
$select_sql "select b1 from lob_002_tab where id = 1";
32:
$s oci_parse($c$select_sql);
33:
oci_execute($s);
34:
35:
$row oci_fetch_array($sOCI_RETURN_LOBS);
36:
37:
var_dump(strlen($row[0]));
38:
39:
// Cleanup
40:
41:
$stmtarray = array(
42:     
"drop table lob_002_tab"
43:
);
44:
45:
oci8_test_sql_execute($c$stmtarray);
46:
47:
?>
48:
===DONE===
49:

Expected

object(OCI-Lob)#%d (1) {
  ["descriptor"]=>
  resource(%d) of type (oci8 descriptor)
}
int(0)

Warning: OCI-Lob::write() expects parameter 2 to be int, string given in %slob_002.php on line %d
NULL
int(4)
int(40000)
int(40004)

Warning: OCI-Lob::seek() expects parameter 1 to be int, string given in %slob_002.php on line %d
NULL
bool(false)
int(40004)
===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:51:05
  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)))
001- object(OCI-Lob)#%d (1) {
002-   ["descriptor"]=>
003-   resource(%d) of type (oci8 descriptor)
004- }
005- int(0)
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:51:05
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
007- Warning: OCI-Lob::write() expects parameter 2 to be int, string given in %slob_002.php on line %d
008- NULL
009- int(4)
010- int(40000)
011- int(40004)
013- Warning: OCI-Lob::seek() expects parameter 1 to be int, string given in %slob_002.php on line %d
014- NULL
015- bool(false)
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
016- int(40004)
017- ===DONE===

 

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

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