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/commit_001.phpt ('Test OCI_NO_AUTO_COMMIT constant')

Script

1: <?php
2:
3:
require(dirname(__FILE__)."/connect.inc");
4: require(
dirname(__FILE__).'/create_table.inc');
5:
6:
$insert_sql "insert into ".$schema.$table_name." (id, value) values (1,1)";
7:
8: if (!(
$s oci_parse($c$insert_sql))) {
9:     die(
"oci_parse(insert) failed!\n");
10: }
11:
12:
/* check with OCI_NO_AUTO_COMMIT mode  */
13:
for ($i 0$i<3$i++) {
14:     if (!
oci_execute($sOCI_NO_AUTO_COMMIT)) {
15:         die(
"oci_execute(insert) failed!\n");
16:     }
17: }
18:
19: for (
$i 0$i<3$i++) {
20:     if (!
oci_execute($sOCI_DEFAULT)) {
21:         die(
"oci_execute(insert) failed!\n");
22:     }
23: }
24:
25:
26:
var_dump(oci_rollback($c));
27:
28:
$select_sql "select * from ".$schema.$table_name."";
29:
30: if (!(
$select oci_parse($c$select_sql))) {
31:     die(
"oci_parse(select) failed!\n");
32: }
33:
34:
/* oci_fetch_all */
35:
if (!oci_execute($select)) {
36:     die(
"oci_execute(select) failed!\n");
37: }
38:
var_dump(oci_fetch_all($select$all));
39:
var_dump($all);
40:
41:
/* ocifetchstatement */
42:
if (!oci_execute($s)) {
43:     die(
"oci_execute(select) failed!\n");
44: }
45:
46:
$insert_sql "insert into ".$schema.$table_name." (id, value) values (1,1)";
47:
48: if (!(
$s oci_parse($c$insert_sql))) {
49:     die(
"oci_parse(insert) failed!\n");
50: }
51:
52: for (
$i 0$i<3$i++) {
53:     if (!
oci_execute($sOCI_DEFAULT)) {
54:         die(
"oci_execute(insert) failed!\n");
55:     }
56: }
57:
58:
var_dump(oci_commit($c));
59:
60:
/* oci_fetch_all */
61:
if (!oci_execute($select)) {
62:     die(
"oci_execute(select) failed!\n");
63: }
64:
var_dump(oci_fetch_all($select$all));
65:
var_dump($all);
66:
67:
68: require(
dirname(__FILE__).'/drop_table.inc');
69:     
70: echo 
"Done\n";
71:
?>
72:

Expected

bool(true)
int(0)
array(5) {
  ["ID"]=>
  array(0) {
  }
  ["VALUE"]=>
  array(0) {
  }
  ["BLOB"]=>
  array(0) {
  }
  ["CLOB"]=>
  array(0) {
  }
  ["STRING"]=>
  array(0) {
  }
}
bool(true)
int(4)
array(5) {
  ["ID"]=>
  array(4) {
    [0]=>
    string(1) "1"
    [1]=>
    string(1) "1"
    [2]=>
    string(1) "1"
    [3]=>
    string(1) "1"
  }
  ["VALUE"]=>
  array(4) {
    [0]=>
    string(1) "1"
    [1]=>
    string(1) "1"
    [2]=>
    string(1) "1"
    [3]=>
    string(1) "1"
  }
  ["BLOB"]=>
  array(4) {
    [0]=>
    NULL
    [1]=>
    NULL
    [2]=>
    NULL
    [3]=>
    NULL
  }
  ["CLOB"]=>
  array(4) {
    [0]=>
    NULL
    [1]=>
    NULL
    [2]=>
    NULL
    [3]=>
    NULL
  }
  ["STRING"]=>
  array(4) {
    [0]=>
    NULL
    [1]=>
    NULL
    [2]=>
    NULL
    [3]=>
    NULL
  }
}
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:17:28
  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:17:28
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+ 
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
001- bool(true)
002- int(0)
003- array(5) {
004-   ["ID"]=>
005-   array(0) {
006-   }
007-   ["VALUE"]=>
008-   array(0) {
009-   }
010-   ["BLOB"]=>
011-   array(0) {
012-   }
013-   ["CLOB"]=>
014-   array(0) {
015-   }
016-   ["STRING"]=>
017-   array(0) {
018-   }
019- }
020- bool(true)
021- int(4)
022- array(5) {
023-   ["ID"]=>
024-   array(4) {
025-     [0]=>
026-     string(1) "1"
027-     [1]=>
028-     string(1) "1"
029-     [2]=>
030-     string(1) "1"
031-     [3]=>
032-     string(1) "1"
033-   }
034-   ["VALUE"]=>
035-   array(4) {
036-     [0]=>
037-     string(1) "1"
038-     [1]=>
039-     string(1) "1"
040-     [2]=>
041-     string(1) "1"
042-     [3]=>
043-     string(1) "1"
044-   }
045-   ["BLOB"]=>
046-   array(4) {
047-     [0]=>
048-     NULL
049-     [1]=>
050-     NULL
051-     [2]=>
052-     NULL
053-     [3]=>
054-     NULL
055-   }
056-   ["CLOB"]=>
057-   array(4) {
058-     [0]=>
059-     NULL
060-     [1]=>
061-     NULL
062-     [2]=>
063-     NULL
064-     [3]=>
065-     NULL
066-   }
067-   ["STRING"]=>
068-   array(4) {
069-     [0]=>
070-     NULL
071-     [1]=>
072-     NULL
073-     [2]=>
074-     NULL
075-     [3]=>
076-     NULL
077-   }
078- }
079- Done

 

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

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