ID:               37130
 User updated by:  jabramson at wgen dot net
 Reported By:      jabramson at wgen dot net
 Status:           Bogus
 Bug Type:         OCI8 related
 Operating System: Windows XP
 PHP Version:      5.1.2
 New Comment:

OK, yes, it's understood I am merely comparing an identifier and not
the resource itself.  Nevertheless this is a clear difference in
behavior, no?  Is it by design?

Note that '===' test fails on those pconnect() resources as well (but
passes on connect() ones).  Does it mean that, aside from querying
oracle server for session info and comparing those results, there is no
reliable identity test for pconnect() resources?


Previous Comments:
------------------------------------------------------------------------

[2006-04-18 21:43:51] [EMAIL PROTECTED]

Comparing resources with "==" doesn't make much sense, as they
identificators may differ, but that doesn't mean underlying connections
are not the same.

------------------------------------------------------------------------

[2006-04-18 21:31:02] jabramson at wgen dot net

Description:
------------
- Apache/1.3.34 (Win32) PHP/5.1.2

- php_oci8.dll is latest build from PECL (dated 4/17/06) : $Revision:
1.293 $

- all related ini settings are default (i.e. no explicit oci8
directives)

according to php manual, non-persistent and persistent db connections
should behave identically.

also according to the manual - this is specified under docs for
oci_connect() - "The second and subsequent calls to oci_connect() with
the same parameters will return the connection handle returned from the
first call..."

i have found that oci_pconnect is creating a new connection handle for
each invocation, whereas oci_connect behaves properly according to the
docs.

Reproduce code:
---------------
<?php

assert_options(ASSERT_WARNING,1);

$cx = oci_connect("user","pass","db");
$cx2 = oci_connect("user","pass","db");

if (assert($cx==$cx2)) {
    print 'oci_connect behaves properly';
}


$pcx = oci_pconnect("user","pass","db");
$pcx2 = oci_pconnect("user","pass","db");

if (assert($pcx==$pcx2)) {
    print 'oci_pconnect behaves properly';
}

?>


Expected result:
----------------
EXPECTED: no warnings, the assertions pass.

Actual result:
--------------
ACTUAL: the oci_connect assertion passed, but the pconnect version does
not.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37130&edit=1

Reply via email to