php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #24738 odbc_connect called twice returns same resource id
Submitted: 2003-07-21 11:16 UTC Modified: 2017-01-08 06:24 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: phpbug at tab1 dot clara dot co dot uk Assigned: krakjoe (profile)
Status: Closed Package: ODBC related
PHP Version: 4.3.2 OS: W2K SP4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpbug at tab1 dot clara dot co dot uk
New email:
PHP Version: OS:

 

 [2003-07-21 11:16 UTC] phpbug at tab1 dot clara dot co dot uk
Description:
------------
I really did want two different connections since I want to run a sub-query for every row retuned in the first query. If I try that with one connection I get, not unreasonably: "connection busy"


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

$dbconn = odbc_connect("DSNNAME","","");
$dbconn2 = odbc_connect("DSNNAME","","");


print_r($dbconn);
print_r($dbconn2);
?>

Expected result:
----------------
I expected the resouce ID's to be different

Actual result:
--------------
C:\php>cli\php filenote.php
Resource id #5Resource id #5

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-21 11:29 UTC] kalowsky@php.net
Known issue, being re-categorized as a Feature Request.  

As a solution, if you change any of the values in the connect call, this should work.  Yes, I know, this is a pain, but the current system is designed based upon a hash of the DSN/USER/PASSWORD.
 [2011-01-01 21:03 UTC] jani@php.net
-Package: Feature/Change Request +Package: ODBC related
 [2017-01-08 06:24 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2017-01-08 06:24 UTC] krakjoe@php.net
This is yet another ODBC bug that has been open for more than a decade, which hasn't generated any decent conversation, and there would appear to be no interest in fixing.

There are better drivers in PHP today, and it would seem everyone is using those.

If anyone thinks I'm wrong to close this, please open a PR that improves ODBC.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 03:01:27 2024 UTC