php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55768 PDO_OCI can't resume session when kill Oracle session's
Submitted: 2011-09-23 13:04 UTC Modified: 2011-09-27 09:12 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mikhail dot v dot gavrilov at gmail dot com Assigned: tony2001
Status: Closed Package: Oracle related
PHP Version: 5.3.8 OS: All
Private report: No CVE-ID:
 [2011-09-23 13:04 UTC] mikhail dot v dot gavrilov at gmail dot com
Description:
------------
I found problem in PDO_OCI, if Oracle session killed by ALTER SYSTEM KILL 
SESSION operator, PDO_OCI can't resume session.

For example we can find all PHP active sessions on Oracle:

SELECT
'ALTER SYSTEM KILL SESSION ''' || s.sid||','|| s.serial#||''' IMMEDIATE;'
FROM   gv$session s
      JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id WHERE  
s.type != 'BACKGROUND'and s.program like 'php-fpm: pool%';

And run results strings for kill session:

ALTER SYSTEM KILL SESSION 'xxxx,xxx' IMMEDIATE; ALTER SYSTEM KILL SESSION 
'xxxx,xxx' IMMEDIATE;

First error that catch PHP script look so:

SQLSTATE[01002]: Disconnect error: 3113 OCIStmtExecute: Error while trying to 
retrieve text for error ORA-03113 separator not found in message(3144)separator 
not found in message(3142)
(/root/rpmbuild/BUILD/php-5.3.8/ext/pdo_oci/oci_statement.c:148)

Second and all next error look so:

SQLSTATE[HY000]: General error: 3114 OCIStmtExecute: Error while trying to 
retrieve text for error ORA-03114
(/root/rpmbuild/BUILD/php-5.3.8/ext/pdo_oci/oci_statement.c:148)

My connection parameters:
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION PDO::ATTR_PERSISTENT => true 
PDO::ATTR_AUTOCOMMIT => false



Patches

make_resuming_pdo_oci_sessions (last revision 2011-09-27 08:15 UTC) by mikhail dot v dot gavrilov at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-24 19:18 UTC] aharvey@php.net
-Package: PDO related +Package: Oracle related
 [2011-09-27 09:11 UTC] tony2001@php.net
Automatic comment from SVN on behalf of tony2001
Revision: http://svn.php.net/viewvc/?view=revision&revision=317381
Log: fix bug #55768 (PDO_OCI can't resume Oracle session after it's been killed)
 [2011-09-27 09:12 UTC] tony2001@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: tony2001
 [2011-09-27 09:12 UTC] tony2001@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-04-18 09:48 UTC] laruence@php.net
Automatic comment on behalf of tony2001
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fad52881198a2fcdb071f0c6c856ff31a1111bb0
Log: fix bug #55768 (PDO_OCI can't resume Oracle session after it's been killed)
 [2012-07-24 23:39 UTC] rasmus@php.net
Automatic comment on behalf of tony2001
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fad52881198a2fcdb071f0c6c856ff31a1111bb0
Log: fix bug #55768 (PDO_OCI can't resume Oracle session after it's been killed)
 [2013-11-17 09:36 UTC] laruence@php.net
Automatic comment on behalf of tony2001
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fad52881198a2fcdb071f0c6c856ff31a1111bb0
Log: fix bug #55768 (PDO_OCI can't resume Oracle session after it's been killed)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 15:01:54 2014 UTC