From: Operating system: Linux PHP version: 5.3.2 Package: OCI8 related Bug Type: Bug Bug description:Script cleanup takes long with Oracle 11 instant client
Description: ------------ PHP scripts that connect to an Oracle 11gR2 database server using version 11 clients (instant client, fat client) hang for approx. one second after the last command in the script has been executed. === version 11 client === PHP was build with the following configure option: --with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_11_2 Executing the test script results in: $ time php oci_connect.php 0.0691978931427 real 0m1.119s user 0m0.055s sys 0m0.058s The first value is printed as the last statement in the script. It will not return immediately to the command-line, but hang noticeably for approx. 1 second. When commenting out the two OCI-related statements the script returns immediately. This may also be a bug in the Oracle client libraries, I am not sure. But the one second pause does not happen when connect and disconnecting with sqlplus: time echo -e "exit\n" | sqlplus *****/*****@//*****/***** SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 1 16:56:11 2010 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production >Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit Production real 0m0.063s user 0m0.018s sys 0m0.011s Test script: --------------- oci_connect.php: <?php list($usec, $sec) = explode(' ', microtime()); $stime = ((float)$usec + (float)$sec); $conn = ocilogon('user', 'pass', 'host/service'); if ($conn === false) die("ocilogon failed\n"); list($usec, $sec) = explode(' ', microtime()); $now = ((float)$usec + (float)$sec); ocilogoff($conn); if ($conn === false) die("ocilogon failed\n"); $elapsed = $now - $stime; fwrite(STDOUT, $elapsed . "\n"); ?> Expected result: ---------------- I would expect the same behavior as with the Oracle 10 client libraries: === version 10 client === When PHP is built against the older, release 10 libraries, this does not happen: --with-oci8=--with-oci8=instantclient,/usr/local/lib64/instantclient/instantclient_10_2 Executing the test script results in: $ time php oci_connect.php 0.0691978931427 real 0m0.161s user 0m0.052s sys 0m0.068s -- Edit bug report at http://bugs.php.net/bug.php?id=52263&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52263&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52263&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52263&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52263&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52263&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52263&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52263&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52263&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52263&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52263&r=support Expected behavior: http://bugs.php.net/fix.php?id=52263&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52263&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52263&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52263&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52263&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52263&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52263&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52263&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52263&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52263&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52263&r=mysqlcfg