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_035.phpt ('oci_lob_copy() - 2')

Script

1: <?php
2:     
3:
require dirname(__FILE__).'/connect.inc';
4: require 
dirname(__FILE__).'/create_table.inc';
5:
6:
$ora_sql "INSERT INTO
7:                        "
.$schema.$table_name." (id, blob)
8:                       VALUES (1, empty_blob())
9:                       RETURNING
10:                                blob
11:                       INTO :v_blob "
;
12:
13:
$statement oci_parse($c,$ora_sql);
14:
$blob oci_new_descriptor($c,OCI_D_LOB);
15:
oci_bind_by_name($statement,":v_blob"$blob,-1,OCI_B_BLOB);
16:
oci_execute($statementOCI_DEFAULT);
17:
18:
var_dump($blob->write("some string here. string, I said"));
19:
oci_commit($c);
20:
21:
$ora_sql "INSERT INTO
22:                        "
.$schema.$table_name." (id, blob)
23:                       VALUES (2, empty_blob())
24:                       RETURNING
25:                                blob
26:                       INTO :v_blob "
;
27:
28:
$statement oci_parse($c,$ora_sql);
29:
$blob oci_new_descriptor($c,OCI_D_LOB);
30:
oci_bind_by_name($statement,":v_blob"$blob,-1,OCI_B_BLOB);
31:
oci_execute($statementOCI_DEFAULT);
32:
33:
oci_commit($c);
34:
35:
$select_sql "SELECT blob FROM ".$schema.$table_name." WHERE id = 1";
36:
$s oci_parse($c$select_sql);
37:
oci_execute($s);
38:
39:
$row1 oci_fetch_array($s);
40:
41:
$select_sql "SELECT blob FROM ".$schema.$table_name." WHERE id = 2 FOR UPDATE";
42:
$s oci_parse($c$select_sql);
43:
oci_execute($sOCI_DEFAULT);
44:
45:
$row2 oci_fetch_array($s);
46:
47:
$dummy oci_new_descriptor($cOCI_D_LOB);
48:
49:
var_dump(oci_lob_copy($dummy$row1[0]));
50:
var_dump(oci_lob_copy($row2[0], $dummy));
51:
52:
var_dump(oci_lob_copy($row2[0], $row1[0], 0));
53:
var_dump(oci_lob_copy($row2[0], $row1[0], -1));
54:
var_dump(oci_lob_copy($row2[0], $row1[0], 100000));
55:
56:
var_dump(oci_lob_size());
57:
var_dump(oci_lob_size($row2[0]));
58: unset(
$dummy->descriptor);
59:
var_dump(oci_lob_size($dummy));
60:
61:
oci_rollback($c);
62:
oci_rollback($c);
63:
oci_commit($c);
64:
oci_commit($c);
65:
66:
$select_sql "SELECT blob FROM ".$schema.$table_name." WHERE id = 2 FOR UPDATE";
67:
$s oci_parse($c$select_sql);
68:
oci_execute($sOCI_DEFAULT);
69:
70:
var_dump($row2 oci_fetch_array($sOCI_RETURN_LOBS));
71:
72: require 
dirname(__FILE__).'/drop_table.inc';
73:
74: echo 
"Done\n";
75:
76:
?>
77:

Expected

int(32)

Warning: oci_lob_copy(): OCI_INVALID_HANDLE in %s on line %d
bool(false)

Warning: oci_lob_copy(): OCI_INVALID_HANDLE in %s on line %d
bool(false)
bool(false)

Warning: oci_lob_copy(): Length parameter must be greater than 0 in %s on line %d
bool(false)
bool(true)

Warning: oci_lob_size() expects exactly 1 parameter, 0 given in %s on line %d
NULL
int(0)

Warning: oci_lob_size(): Unable to find descriptor property in %s on line %d
bool(false)
array(2) {
  [0]=>
  string(0) ""
  ["BLOB"]=>
  string(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:59:16
  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- int(32)
003- Warning: oci_lob_copy(): OCI_INVALID_HANDLE in %s on line %d
004- bool(false)
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:59:16
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
006- Warning: oci_lob_copy(): OCI_INVALID_HANDLE in %s on line %d
007- bool(false)
008- 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
009- 
010- Warning: oci_lob_copy(): Length parameter must be greater than 0 in %s on line %d
011- bool(false)
012- bool(true)
013- 
014- Warning: oci_lob_size() expects exactly 1 parameter, 0 given in %s on line %d
015- NULL
016- int(0)
017- 
018- Warning: oci_lob_size(): Unable to find descriptor property in %s on line %d
019- bool(false)
020- array(2) {
021-   [0]=>
022-   string(0) ""
023-   ["BLOB"]=>
024-   string(0) ""
025- }
026- Done

 

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

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