php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48723 mssql_close($res) do not actually close connection
Submitted: 2009-06-29 17:59 UTC Modified: 2009-07-12 01:00 UTC
From: andrey at djhd dot com Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 5.2.10 OS: XP SP2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: andrey at djhd dot com
New email:
PHP Version: OS:

 

 [2009-06-29 17:59 UTC] andrey at djhd dot com
Description:
------------
I have persistent connections turned off.
mssql_close will not close connection if it was opened with resource link.
If no resource link and everything by default then everything ok.

Reproduce code:
---------------
$link1 = mssql_connect ($servername,"sa","pass",1);
mssql_close ($link1);
sleep (1000);


Expected result:
----------------
I expect that it will disconnect and then sleep

Actual result:
--------------
It disconnects only on exit from the script.

The following works:

mssql_connect ($servername,"sa","moyadatabase",1);
mssql_close ();
sleep (1000);


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-01 18:07 UTC] sjoerd-php at linuxonly dot nl
Thank you for your bug report.

How did you determine that the connection was not closed?
 [2009-07-04 09:40 UTC] sjoerd-php at linuxonly dot nl
Andrey said:
> I see it in the profiler.
> In good case there is Logout record before sleep, in bad - nothing.
 [2009-07-04 22:32 UTC] jani@php.net
Try adding 'unset($linkl);' after the close.
 [2009-07-12 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC