From: bradleyb at trans-soft dot net Operating system: redhat 9 PHP version: 4.3.4 PHP Bug Type: Apache related Bug description: odbc.ini file descriptors left open
Description: ------------ When i make a connection to my sybase db using odbc_connect, apache leaves the odbc.ini file open even thought i call odbc_close(). I am unable to figure out how to get these files closed. I have done quite a bit of research but am unable to locate any one who has experienced this issue. Apache is the User assigned to the file which is located -> etc/odbc.ini At the top of each page that i load is an include statement that creates a connection to the db. When i have finished running my query (odbc_do()), i call odbc_close(). For each page that is loaded, a new instance of odbc.ini is opened for each call to odbc_connect(). I verify this by using -> lsof odbc.ini in the etc/ directory. Reproduce code: --------------- $db = odbc_connect($DSN, $dbUserName, $dbPassWord); if(!$db) { die("Failure to connect to DB"); } if(@ $dbResource = odbc_do($db, $query)) { if(@ odbc_fetch_row($dbResource)) { $myData = odbc_result $dbResource, "ColumnName"); } odbc_close($db); } Expected result: ---------------- The odbc.ini file descriptor located in the etc/ directory to be closed. Actual result: -------------- file is left open? lsof odbc.ini COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME httpd 20268 apache 8r REG 3,6 1105 244685 odbc.ini -- Edit bug report at http://bugs.php.net/?id=27553&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27553&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27553&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27553&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27553&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27553&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27553&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27553&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27553&r=support Expected behavior: http://bugs.php.net/fix.php?id=27553&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27553&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27553&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27553&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27553&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27553&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27553&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27553&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27553&r=float