#48723 [Opn->Fbk]: mssql_close($res) do not actually close connection
| From: | jani@php.net | Date: | Sat, 04 Jul 2009 22:32:08 +0000 |
| Subject: | #48723 [Opn->Fbk]: mssql_close($res) do not actually close connection | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139263@lists.php.net to get a copy of this message | ||
ID: 48723
Updated by: jani@php.net
Reported By: andrey at djhd dot com
-Status: Open
+Status: Feedback
Bug Type: MSSQL related
Operating System: XP SP2
PHP Version: 5.2.10
New Comment:
Try adding 'unset($linkl);' after the close.
Previous Comments:
------------------------------------------------------------------------
[2009-07-04 09:40:53] 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-01 18:07:19] sjoerd-php at linuxonly dot nl
Thank you for your bug report.
How did you determine that the connection was not closed?
------------------------------------------------------------------------
[2009-06-29 17:59:46] 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);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48723&edit=1