php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37055 lost link /multiple logns / free statment
Submitted: 2006-04-12 12:57 UTC Modified: 2006-04-12 13:38 UTC
From: ilya dot gruzinov at gmail dot com Assigned:
Status: Closed Package: OCI8 related
PHP Version: 5.1.2 OS: Debian stable
Private report: No CVE-ID:
 [2006-04-12 12:57 UTC] ilya dot gruzinov at gmail dot com
Description:
------------
I make 2 connections. After every connect i run query on new link.
Then i free statment from results and try run query for second connections and get warning.

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

$db1 = oci_pconnect ("ilya", "ilya", "cc10");
$sth1 = OCIParse($db1, "select * from test");

$db2 = oci_pconnect ("ilya", "ilya", "cc10");
$sth2 = OCIParse($db2, "select * from test");

ocifreestatement($sth1);
ocifreestatement($sth2);

$sth3 = OCIParse($db2, "select * from test");

?>               


Expected result:
----------------
_empty_

Actual result:
--------------
Warning: ociparse(): 3 is not a valid oci8 connection resource in /home/shagren/public_html/oracle10/test2.php on line 12

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-12 12:59 UTC] ilya dot gruzinov at gmail dot com
more correct example, with ociexecute

<?php

$db1 = oci_pconnect ("ilya", "ilya", "cc10");
$sth1 = OCIParse($db1, "select * from test");
OCIExecute($sth1);

$db2 = oci_pconnect ("ilya", "ilya", "cc10");
$sth2 = OCIParse($db2, "select * from test");
OCIExecute($sth2);

ocifreestatement($sth1);
ocifreestatement($sth2);

$sth3 = OCIParse($db2, "select * from test");

?>               


PS: problem only with persistent connection and php 5.1.2, with 5.1.1 i have not problem
 [2006-04-12 13:38 UTC] tony2001@php.net
This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 03:02:42 2014 UTC