php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #553 More than one ODBC_CONNECT gives back the same connectionnumber
Submitted: 1998-07-15 08:06 UTC Modified: 1998-08-13 16:12 UTC
From: Gerhard at frappe dot iaf dot nl Assigned:
Status: Closed Package: ODBC related
PHP Version: 3.0.1 OS: WINNT
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Gerhard at frappe dot iaf dot nl
New email:
PHP Version: OS:

 

 [1998-07-15 08:06 UTC] Gerhard at frappe dot iaf dot nl
<?
$testdb1 = odbc_connect("IntPhone","Gerhard","") || die("DIE FIEND, DIE!");
$testdb2 = odbc_connect("WebLog","SysDba","password") || die("DIE FIEND, DIE!");
print "test1 $testdb1<br>";
print "test2 $testdb2<br>";
?>

Results in both $testdb1 and $testdb2 having the value 1. The problem get real when on a page more than one database has to be opened like in:

<?
$testdb1 = odbc_connect("weblog","sysdba","password") || die("DIE FIEND, DIE!");
$res1 = odbc_exec($testdb1,"select count(distinct clienthost) from INETLOG");
print "Step 1, count: ".odbc_result($res1,1)."<br>";
odbc_close($testdb1) || die ("DIE close!");

$testdb2 = odbc_connect("weblog","sysdba","password") || die("DIE FIEND, DIE!");
$res2 = odbc_exec($testdb2,"select count(distinct target) from INETLOG");
print "Step 2, count: ".odbc_result($res2,1)."<br>";
odbc_close($testdb2);
?>

Here the script gives an error on the line starting with $res2. if the 4th line and the 6th line are removed things are working again but it becomes very difficul to use different independant scripts on a single page.

platform winNt, database Intrbase through ODBC, but also tested on a ODBC connection to a paradox database with the same results. PHP version 3.0.1 (the executable for download at the moment of writing.)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-08-13 16:12 UTC] shane
Current CVS does not have this problem (tested on NT4sp3 with access and foxpro drivers).  Please try it and resubmit bug report if your problem still occurs.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC