ID: 19946 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: ODBC related Operating System: Red Har 7.3 PHP Version: 4.2.1 New Comment:
What you are seeing is how ODBC works. This really really isn't a bug in PHP, but rather from the sounds of it a bug in your ODBC driver. Turn on SQL logging and you should see the SQLDisconnect call, at which point PHP no longer has any idea of any connection... it's done with them. All actual connections are handled by the ODBC driver, PHP just asks the driver to make a connection and process it using ABC options. Previous Comments: ------------------------------------------------------------------------ [2002-10-17 01:34:30] [EMAIL PROTECTED] I'm using PHP 4.2.1 with unixODBC and FreeTDS to connect to MSSQL 7.0 and MSSQL 2000 servers. I have a problem with the database connection not being closed by PHP. I've tried combinations of odbc_connect, odbc_pconnect, odbc_close, odbc_close_all, and not calling any close function. ( the documentation claims the connection will close automaticaly when the script terminates ) All combinations I've tried leave an open connection on the server. If I use the 'isql' program, again with unixODBC and FreeTDS, I do not have this problem. I've had the same problem on RH7.0 and RH7.3 and with PHP 4.0 to 4.1.2. What's Up? Further investgation with Ethereal and netstat show after PHP excutes an odbc_exec() PHP receives the data then never sends anither packet to the sever leaving the socket in an ESTABLISHED state. Neither odbc_close() nor odbc_close_all() send any packets. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19946&edit=1