From: jabramson at wgen dot net
Operating system: Windows XP
PHP version: 5.1.2
PHP Bug Type: OCI8 related
Bug description: oci_pconnect does not reuse resource within single script
runtime
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 bug report at http://bugs.php.net/?id=37130&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=37130&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=37130&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=37130&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37130&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=37130&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37130&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37130&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37130&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37130&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37130&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=37130&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=37130&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37130&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37130&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37130&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37130&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37130&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37130&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37130&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37130&r=mysqlcfg