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/define2.phpt ('Test oci_define_by_name types')

Script

1: <?php
2:
3:
require(dirname(__FILE__)."/connect.inc");
4:
5:
$stmtarray = array(
6:     
"drop table phptestrawtable",
7:     
"create table phptestrawtable( id number(10), fileimage raw(1000))"
8:
);
9:                          
10:
oci8_test_sql_execute($c$stmtarray);
11:
12:
$stmt oci_parse ($c"insert into phptestrawtable (id, fileimage) values (:id, :fileimage)");
13:
$i=1;
14:
$fileimage file_get_contentsdirname(__FILE__)."/test.gif");
15:
$fileimage substr($fileimage0300);
16:
var_dump(md5($fileimage));
17:
18:
oci_bind_by_name$stmt":id"$i, -1);
19:
oci_bind_by_name$stmt":fileimage"$fileimage, -1SQLT_BIN);
20:
oci_execute($stmtOCI_DEFAULT);
21:
oci_commit($c);
22:
23: echo 
"Test 1\n";
24:
$stmt oci_parse($c"SELECT fileimage FROM phptestrawtable");
25:
var_dump(oci_define_by_name($stmt'FILEIMAGE'$fi));
26:
oci_execute($stmt);
27:
28: while (
oci_fetch($stmt)) {
29:     
var_dump($fi);
30:     echo 
"file md5:" md5($fi) . "\n";
31: }
32:
33: echo 
"Test 2\n";
34:
$stmt oci_parse($c"SELECT fileimage FROM phptestrawtable");
35:
var_dump(oci_define_by_name($stmt'FILEIMAGE'$fi));
36:
oci_execute($stmt);
37:
38: while (
oci_fetch($stmt)) {
39:     
var_dump($fi);
40:     echo 
"file md5:" md5($fi) . "\n";
41: }
42:
43: echo 
"Test 3 - test repeatability\n";
44:
$stmt oci_parse($c"SELECT fileimage FROM phptestrawtable");
45:
var_dump(oci_define_by_name($stmt'FILEIMAGE'$fiSQLT_STR));
46:
oci_execute($stmt);
47:
48: while (
oci_fetch($stmt)) {
49:     
var_dump($fi);
50:     echo 
"file md5:" md5($fi) . "\n";
51: }
52:
53: echo 
"Test 4 - wrong type\n";
54:
$stmt oci_parse($c"SELECT fileimage FROM phptestrawtable");
55:
var_dump(oci_define_by_name($stmt'FILEIMAGE'$fiSQLT_RSET));
56:
oci_execute($stmt);
57:
58: while (
oci_fetch($stmt)) {
59:     
var_dump($fi);
60:     echo 
"file md5:" md5($fi) . "\n";
61: }
62:
63:
// Cleanup
64:
65:
$stmtarray = array(
66:     
"drop table phptestrawtable"
67:
);
68:
69:
oci8_test_sql_execute($c$stmtarray);
70:
71: echo 
"Done\n";
72:
?>
73:

Expected

string(32) "88b274d7a257ac6f70435b83abd4e26e"
Test 1
bool(true)
string(300) "GIF89%s"
file md5:88b274d7a257ac6f70435b83abd4e26e
Test 2
bool(true)
string(300) "GIF89%s"
file md5:88b274d7a257ac6f70435b83abd4e26e
Test 3 - test repeatability
bool(true)
string(600) "47494638396178004300E66A007F82B839374728252ACCCDE2A1A4CBD3D5E7B2B4D44342588386B98283B35252729092C2C2C4DEAAACD04C4B635B5C83DDDEEC3B383C6E71A56A6D9D61638D7579B17B7EB5E5E6F0999CC68C8DC1B9BAD96B6B924E4E6B7174A97A7AA3888BBD7274A37473988E90C15A5B7EE2E3EF7B7DADA4A5D06D70A27276AC9596C8BBBDD97478AE8588BB9295C3D8D9EA9292C46466926B6E9FA5A8CE9496C52E2B2F535168B3B4D76C6A8C5C5B768A8DBF666896686A9A9C9FC8312E39AEB0D39C9CCD5556789EA1CA9699C58182AF6769973F3D50BCBEDA5E60899899C88C8EBF898ABA57587CB6B7D7D5D7E8221E206C6F9ECED0E4BFC0DC777BB47678A75F5E7D9999CC6E6F987377AE221E1FFFFFFF908E8F595657C7C6C7EEEEF5D5D4D5F6F6"
file md5:80bb3201e2a8bdcb8ab3e1a44a82bb8a
Test 4 - wrong type
bool(true)

Warning: oci_fetch(): ORA-00932: inconsistent datatypes%s on line %d
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:27: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)))
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:27: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
001- string(32) "88b274d7a257ac6f70435b83abd4e26e"
002- Test 1
003- bool(true)
004- string(300) "GIF89%s"
005- file md5:88b274d7a257ac6f70435b83abd4e26e
006- Test 2
007- bool(true)
008- string(300) "GIF89%s"
009- file md5:88b274d7a257ac6f70435b83abd4e26e
010- Test 3 - test repeatability
011- bool(true)
012- string(600) "47494638396178004300E66A007F82B839374728252ACCCDE2A1A4CBD3D5E7B2B4D44342588386B98283B35252729092C2C2C4DEAAACD04C4B635B5C83DDDEEC3B383C6E71A56A6D9D61638D7579B17B7EB5E5E6F0999CC68C8DC1B9BAD96B6B924E4E6B7174A97A7AA3888BBD7274A37473988E90C15A5B7EE2E3EF7B7DADA4A5D06D70A27276AC9596C8BBBDD97478AE8588BB9295C3D8D9EA9292C46466926B6E9FA5A8CE9496C52E2B2F535168B3B4D76C6A8C5C5B768A8DBF666896686A9A9C9FC8312E39AEB0D39C9CCD5556789EA1CA9699C58182AF6769973F3D50BCBEDA5E60899899C88C8EBF898ABA57587CB6B7D7D5D7E8221E206C6F9ECED0E4BFC0DC777BB47678A75F5E7D9999CC6E6F987377AE221E1FFFFFFF908E8F595657C7C6C7EEEEF5D5D4D5F6F6"
013- file md5:80bb3201e2a8bdcb8ab3e1a44a82bb8a
014- Test 4 - wrong type
015- bool(true)
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
017- Warning: oci_fetch(): ORA-00932: inconsistent datatypes%s on line %d
018- Done
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.