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_020.phpt ('oci_lob_write()/erase()/read() with CLOBs')

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." (Clob)
8:                       VALUES (empty_Clob())
9:                       RETURNING
10:                                clob
11:                       INTO :v_clob "
;
12:
13:
$statement oci_parse($c,$ora_sql);
14:
$clob oci_new_descriptor($c,OCI_D_LOB);
15:
oci_bind_by_name($statement,":v_clob"$clob,-1,OCI_B_CLOB);
16:
oci_execute($statementOCI_DEFAULT);
17:
18:
var_dump($clob);
19:
20:
$str "this is a biiiig faaat test string. why are you reading it, I wonder? =)";
21:
var_dump($clob->write($str));
22:
var_dump($clob->erase(10,20));
23:
24:
oci_commit($c);
25:
26:
$select_sql "SELECT clob FROM ".$schema.$table_name." FOR UPDATE";
27:
$s oci_parse($c$select_sql);
28:
oci_execute($sOCI_DEFAULT);
29:
30:
var_dump($row oci_fetch_array($s));
31:
32:
var_dump($row[0]->read(2));
33:
var_dump($row[0]->read(5));
34:
var_dump($row[0]->read(50));
35:
36:
var_dump($clob->erase());
37:
var_dump($clob->erase(-10));
38:
var_dump($clob->erase(10,-20));
39:
var_dump($clob->erase(-10,-20));
40:
var_dump($clob->erase(-10,-201));
41:
42:
var_dump(oci_lob_erase($clob));
43:
var_dump(oci_lob_erase($clob,-10));
44:
var_dump(oci_lob_erase($clob,10,-20));
45:
var_dump(oci_lob_erase($clob,-10,-20));
46:
var_dump(oci_lob_erase($clob,-10,-201));
47:
48: unset(
$clob->descriptor);
49:
var_dump(oci_lob_erase($clob,10,20));
50:
51: require 
dirname(__FILE__).'/drop_table.inc';
52:
53: echo 
"Done\n";
54:
55:
?>
56:

Expected

object(OCI-Lob)#%d (1) {
  ["descriptor"]=>
  resource(%d) of type (oci8 descriptor)
}
int(77)
int(20)
array(2) {
  [0]=>
  object(OCI-Lob)#%d (1) {
    ["descriptor"]=>
    resource(%d) of type (oci8 descriptor)
  }
  ["CLOB"]=>
  object(OCI-Lob)#%d (1) {
    ["descriptor"]=>
    resource(%d) of type (oci8 descriptor)
  }
}
string(2) ""
string(5) "th"
string(50) "is                     st string. why are you read"

Warning: OCI-Lob::erase(): ORA-22990: LOB locators cannot span transactions in %s on line %d
bool(false)

Warning: OCI-Lob::erase(): Offset must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: OCI-Lob::erase(): Length must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: OCI-Lob::erase(): Offset must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: OCI-Lob::erase() expects at most 2 parameters, 3 given in %s on line %d
NULL

Warning: oci_lob_erase(): ORA-22990: LOB locators cannot span transactions in %s on line %d
bool(false)

Warning: oci_lob_erase(): Offset must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: oci_lob_erase(): Length must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: oci_lob_erase(): Offset must be greater than or equal to 0 in %s on line %d
bool(false)

Warning: oci_lob_erase() expects at most 3 parameters, 4 given in %s on line %d
NULL

Warning: oci_lob_erase(): Unable to find descriptor property in %s on line %d
bool(false)
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:32
  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:32
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
001- object(OCI-Lob)#%d (1) {
002-   ["descriptor"]=>
003-   resource(%d) of type (oci8 descriptor)
004- }
005- int(77)
006- int(20)
007- array(2) {
008-   [0]=>
009-   object(OCI-Lob)#%d (1) {
010-     ["descriptor"]=>
011-     resource(%d) of type (oci8 descriptor)
012-   }
013-   ["CLOB"]=>
014-   object(OCI-Lob)#%d (1) {
015-     ["descriptor"]=>
016-     resource(%d) of type (oci8 descriptor)
017-   }
018- }
019- string(2) ""
020- string(5) "th"
021- string(50) "is                     st string. why are you read"
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
023- Warning: OCI-Lob::erase(): ORA-22990: LOB locators cannot span transactions in %s on line %d
024- bool(false)
025- 
026- Warning: OCI-Lob::erase(): Offset must be greater than or equal to 0 in %s on line %d
027- bool(false)
028- 
029- Warning: OCI-Lob::erase(): Length must be greater than or equal to 0 in %s on line %d
030- bool(false)
031- 
032- Warning: OCI-Lob::erase(): Offset must be greater than or equal to 0 in %s on line %d
033- bool(false)
034- 
035- Warning: OCI-Lob::erase() expects at most 2 parameters, 3 given in %s on line %d
036- NULL
037- 
038- Warning: oci_lob_erase(): ORA-22990: LOB locators cannot span transactions in %s on line %d
039- bool(false)
040- 
041- Warning: oci_lob_erase(): Offset must be greater than or equal to 0 in %s on line %d
042- bool(false)
043- 
044- Warning: oci_lob_erase(): Length must be greater than or equal to 0 in %s on line %d
045- bool(false)
046- 
047- Warning: oci_lob_erase(): Offset must be greater than or equal to 0 in %s on line %d
048- bool(false)
049- 
050- Warning: oci_lob_erase() expects at most 3 parameters, 4 given in %s on line %d
051- NULL
052- 
053- Warning: oci_lob_erase(): Unable to find descriptor property in %s on line %d
054- bool(false)
055- Done

 

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

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