#50966 [NEW]: Some resource leak (odbc_connect and odbc_close) using dbase or Microsoft Acces
| From: | gg dot cwlee at gmail dot com | Date: | Mon, 08 Feb 2010 11:19:30 +0000 |
| Subject: | #50966 [NEW]: Some resource leak (odbc_connect and odbc_close) using dbase or Microsoft Acces | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-147319@lists.php.net to get a copy of this message | ||
From: gg dot cwlee at gmail dot com
Operating system: Windows XP
PHP version: 5.2.12
PHP Bug Type: ODBC related
Bug description: Some resource leak (odbc_connect and odbc_close) using dbase or Microsoft Acces
Description:
------------
We have a resource leak problem when using Apache 2.2.11 and PHP 5.2.12
with odbc_connect() and odbc_close() functions on dbase or Microsoft
Access.
From my observe, it will leak some (Nonpaged) kernel Memory and some
handles not free by the Apache(HTTPD.EXE).
And I also tested no this resource leak problem on Apache 2.2.11 and PHP
5.2.0.
Thanks.
Chris
Reproduce code:
---------------
<?php
$dsnMDB = "DRIVER=Microsoft Access Driver
(*.mdb);UID=admin;UserCommitSync=Yes;Threads=3;SafeTransactions=0;PageTimeout=5;MaxScanRows=8;MaxBufferSize=2048;FIL=MS
Access;DriverId=25;DefaultDir=D:\;DBQ=D:\db1.mdb;";
$dsnDBF = "DRIVER=Microsoft dBase Driver
(*.dbf);UID=admin;UserCommitSync=Yes;Threads=3;Statistics=0;SafeTransactions=0;PageTimeout=5;MaxScanRows=8;MaxBufferSize=2048;FIL=dBase
IV;DriverId=277;Deleted=1;DefaultDir=D:\;DBQ=D:\datasource\;CollatingSequence=ASCII;";
$dsn= $dsnDBF;
$userDB=odbc_connect($dsn,"","");
odbc_close($userDB);
?>
--
Edit bug report at http://bugs.php.net/?id=50966&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50966&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50966&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50966&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50966&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50966&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50966&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50966&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50966&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50966&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50966&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50966&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50966&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50966&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50966&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50966&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50966&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50966&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50966&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50966&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50966&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50966&r=mysqlcfg