#37130 [Opn->Bgs]: oci_pconnect does not reuse resource within single script runtime

From: Date: Tue, 18 Apr 2006 21:43:51 +0000
Subject: #37130 [Opn->Bgs]: oci_pconnect does not reuse resource within single script runtime
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95968@lists.php.net to get a copy of this message
ID: 37130 Updated by: tony2001@php.net Reported By: jabramson at wgen dot net -Status: Open +Status: Bogus Bug Type: OCI8 related Operating System: Windows XP PHP Version: 5.1.2 New Comment: Comparing resources with "==" doesn't make much sense, as they identificators may differ, but that doesn't mean underlying connections are not the same. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#95968) next »