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/conn_attr_2.phpt ('Set and get of connection attributes across persistent connections and sysdba connection.')

Script

1:
2: <?php
3:
4: $testuser     
'testuser_attr_2';  // Used in conn_attr.inc
5:
$testpassword 'testuser'
6:
7: require(
dirname(__FILE__)."/conn_attr.inc");
8:
9:
$attr_array = array('MODULE','ACTION','CLIENT_INFO','CLIENT_IDENTIFIER');
10:
11: echo
"**Set values using pconnect-1**\n";
12:
13:
var_dump($pc1 oci_pconnect($testuser,$testpassword,$dbase));
14: foreach(
$attr_array as $attr) {
15:     
set_attr($pc1,$attr,100);
16: }
17:
18:
//  using pc1 again
19:
echo"\n**Get values using pconnect-2**\n";
20:
var_dump($pc3 oci_pconnect($testuser,$testpassword,$dbase));
21: foreach(
$attr_array as $attr) {
22:     
get_attr($pc3,$attr);
23: }
24:
25:
// Get with different pconnect
26:
echo"\n**Get values using pconnect-3**\n";
27:
var_dump($pc2 oci_pconnect($testuser,$testpassword,$dbase,'UTF8'));
28: foreach(
$attr_array as $attr) {
29:     
get_attr($pc2,$attr);
30: }
31:
32:
oci_close($pc1);
33:
oci_close($pc2);
34:
oci_close($pc3);
35:
36:
// Re-open a persistent connection and check for the attr values.
37:
echo "\n**Re-open a pconnect()**\n";
38:
var_dump($pc4 oci_pconnect($testuser,$testpassword,$dbase));
39: foreach(
$attr_array as $attr) {
40:     
get_attr($pc4,$attr);
41: }
42:
oci_close($pc4);
43:
44:
// Test with SYSDBA connection.
45:
echo "\n**Test with SYSDBA connection**\n";
46:
$sys_c1 = @oci_pconnect($testuser,$testpassword,$dbase,false,OCI_SYSDBA);
47:
var_dump($sys_c1);
48: if (!
$sys_c1) {
49:     
$e oci_error();
50:     if (
$e['code'] != 1031 && $e['code'] != 1017) {
51:         
var_dump($e);
52:     }
53: } else {
54:     
set_attr($sys_c1,'ACTION',10);
55:     
get_sys_attr($sys_c1,'ACTION');
56:     
get_attr($sys_c1,'ACTION');
57:     
oci_close($sys_c1);
58: }
59:
60:
clean_up($c);
61:
62: echo 
"Done\n";
63:
?>
64:

Expected

**Set values using pconnect-1**
resource(%d) of type (oci8 persistent connection)
Value of MODULE has been set successfully
Value of ACTION has been set successfully
Value of CLIENT_INFO has been set successfully
Value of CLIENT_IDENTIFIER has been set successfully

**Get values using pconnect-2**
resource(%d) of type (oci8 persistent connection)
The value of MODULE is PHP TEST100
The value of ACTION is TASK100
The value of CLIENT_INFO is INFO1100
The value of CLIENT_IDENTIFIER is ID00100

**Get values using pconnect-3**
resource(%d) of type (oci8 persistent connection)
The value of MODULE is %s
The value of ACTION is 
The value of CLIENT_INFO is 
The value of CLIENT_IDENTIFIER is 

**Re-open a pconnect()**
resource(%d) of type (oci8 persistent connection)
The value of MODULE is PHP TEST100
The value of ACTION is TASK100
The value of CLIENT_INFO is INFO1100
The value of CLIENT_IDENTIFIER is ID00100

**Test with SYSDBA connection**
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:18: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)))
001- **Set values using pconnect-1**
002- resource(%d) of type (oci8 persistent connection)
003- Value of MODULE has been set successfully
004- Value of ACTION has been set successfully
005- Value of CLIENT_INFO has been set successfully
006- Value of CLIENT_IDENTIFIER has been set successfully
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:18: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
008- **Get values using pconnect-2**
009- resource(%d) of type (oci8 persistent connection)
010- The value of MODULE is PHP TEST100
011- The value of ACTION is TASK100
012- The value of CLIENT_INFO is INFO1100
013- The value of CLIENT_IDENTIFIER is ID00100
015- **Get values using pconnect-3**
016- resource(%d) of type (oci8 persistent connection)
017- The value of MODULE is %s
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
018- The value of ACTION is 
019- The value of CLIENT_INFO is 
020- The value of CLIENT_IDENTIFIER is 
021- 
022- **Re-open a pconnect()**
023- resource(%d) of type (oci8 persistent connection)
024- The value of MODULE is PHP TEST100
025- The value of ACTION is TASK100
026- The value of CLIENT_INFO is INFO1100
027- The value of CLIENT_IDENTIFIER is ID00100
028- 
029- **Test with SYSDBA connection**
030- bool(false)
031- Done

 

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

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