|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-10 19:45 UTC] sniper@php.net
[2004-03-11 11:01 UTC] bradleyb at trans-soft dot net
[2004-03-13 04:59 UTC] sniper@php.net
[2004-03-15 10:05 UTC] bradleyb at trans-soft dot net
[2004-03-15 11:10 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 23:00:01 2025 UTC |
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