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_031.phpt ('Test LOB->read(), LOB->seek() and LOB->tell() with nul bytes in data')

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." (blob)
8:                       VALUES (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:
$blob->write("test");
19:
$blob->tell();
20:
$blob->seek(10OCI_SEEK_CUR);
21:
$blob->write("string");
22:
$blob->flush();
23:
24:
$select_sql "SELECT blob FROM ".$schema.$table_name;
25:
$s oci_parse($c$select_sql);
26:
oci_execute($s);
27:
$row oci_fetch_array($s);
28:
29:
$row[0]->read(3);
30: echo 
" 1. ".$row[0]->tell(). "\n";
31:
32:
$row[0]->read(3);
33: echo 
" 2. ".$row[0]->tell(). "\n";
34:
35:
$row[0]->read(3);
36: echo 
" 3. ".$row[0]->tell(). "\n";
37:
38:
$row[0]->read(6);
39: echo 
" 4. ".$row[0]->tell(). "\n";
40:
41:
$row[0]->read(4);
42: echo 
" 5. ".$row[0]->tell(). "\n";
43:
44:
// Read past end
45:
$row[0]->read(5);
46: echo 
" 6. ".$row[0]->tell(). "\n";
47:
48:
$row[0]->read(1);
49: echo 
" 8. ".$row[0]->tell(). "\n";
50:
51:
// Now seek
52:
$row[0]->seek(1);
53: echo 
" 9. ".$row[0]->tell(). "\n";
54:
55:
$row[0]->seek(8);
56: echo 
"10. ".$row[0]->tell(). "\n";
57:
58:
$row[0]->seek(20);
59: echo 
"11. ".$row[0]->tell(). "\n";
60:
61:
// Seek past end
62:
$row[0]->seek(25);
63: echo 
"12. ".$row[0]->tell(). "\n";
64:
65:
// Seek past end
66:
$row[0]->seek(2OCI_SEEK_SET);
67: echo 
"13. ".$row[0]->tell(). "\n";
68:
69:
// Move on 2 more
70:
$row[0]->seek(2OCI_SEEK_CUR);
71: echo 
"14. ".$row[0]->tell(). "\n";
72:
73:
// Move 3 past the end
74:
$row[0]->seek(3OCI_SEEK_END);
75: echo 
"15. ".$row[0]->tell(). "\n";
76:
77:
// Move 4 before the end
78:
$row[0]->seek(-4OCI_SEEK_END);
79: echo 
"16. ".$row[0]->tell(). "\n";
80:
81: require 
dirname(__FILE__).'/drop_table.inc';
82:
83: echo 
"Done\n";
84:
85:
?>
86:

Expected

1. 3
 2. 6
 3. 9
 4. 15
 5. 19
 6. 20
 8. 20
 9. 1
10. 8
11. 20
12. 25
13. 2
14. 4
15. 23
16. 16
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:58:17
  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:58:17
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+ 
001- 1. 3
002-  2. 6
003-  3. 9
004-  4. 15
005-  5. 19
006-  6. 20
007-  8. 20
008-  9. 1
009- 10. 8
010- 11. 20
011- 12. 25
012- 13. 2
013- 14. 4
014- 15. 23
015- 16. 16
016- Done
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 (5 days ago)

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