php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19946 ODBC fails to close connections
Submitted: 2002-10-17 01:34 UTC Modified: 2002-10-17 08:11 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: harold at worby dot dns2go dot com Assigned:
Status: Not a bug Package: ODBC related
PHP Version: 4.2.1 OS: Red Har 7.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
20 + 10 = ?
Subscribe to this entry?

 
 [2002-10-17 01:34 UTC] harold at worby dot dns2go dot com
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-17 08:11 UTC] kalowsky@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC