From:             shagren at ua dot fm
Operating system: Win98
PHP version:      4.3.4
PHP Bug Type:     ODBC related
Bug description:  odbc_free_result cause warning when work with 2 connection

Description:
------------
I use 2 odbc connection to ms-access database.

When i close second connection, i cannot free result from first connection
- php show warning.



And first and second connections have identical resource id.

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

error_reporting(E_ALL);



//make 2 connection(ms-access database)

$conn1 = odbc_connect("test_access", "", "");

$conn2 = odbc_connect("test_access", "", "");



//echo connection id

echo "Connection1: $conn1 \nConnection2: $conn2\n";



//exec query

$result = odbc_exec($conn1, "select count(*) from temp_table");



//close connection2

odbc_close($conn2);



//free result from connection1

odbc_free_result($result);

?>

Expected result:
----------------
Connection1: Resource id #1

Connection2: Resource id #2



Actual result:
--------------
Connection1: Resource id #1

Connection2: Resource id #1

PHP Warning:  odbc_free_result(): 2 is not a valid ODBC result resource in
C:\Temp\test3.php on line 18



-- 
Edit bug report at http://bugs.php.net/?id=27932&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27932&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27932&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27932&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27932&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27932&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27932&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27932&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27932&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27932&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27932&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27932&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27932&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27932&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27932&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27932&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27932&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27932&r=float

Reply via email to