Bug #67799 [Opn->Wfx]: mssql_close($link) doesn't seem to close the $link
| From: | kalle@php.net | Date: | Sat, 15 Oct 2016 23:18:54 +0000 |
| Subject: | Bug #67799 [Opn->Wfx]: mssql_close($link) doesn't seem to close the $link | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204815@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67799&edit=1
ID: 67799
Updated by: kalle@php.net
Reported by: maferra at isq dot pt
Summary: mssql_close($link) doesn't seem to close the $link
-Status: Open
+Status: Wont fix
Type: Bug
Package: MSSQL related
Operating System: SunOS 5.11 11.1 i86pc
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
With MSSQL being removed from PHP as of PHP7.0, and ext/mssql not having a maintainer, I'm
gonna close this report as a Won't fix, until maybe one day it will find a new maintainer.
Alternatively you can use sqlsrv from Microsoft if you are on Windows, or pdo_dblib if you are on
Unix.
Previous Comments:
------------------------------------------------------------------------
[2014-08-06 16:23:56] maferra at isq dot pt
Description:
------------
I'm using PHP 5.3.14, but I believe that the mssql extension has not been updated for a while.
Description: mssql_close($link) doesn't seem to close the $link (and perhaps NULL the $link
variable), but mssql_close() does close the last opened link. In the test script I have made an
example.
Test script:
---------------
MSSQL_SERVERNAME, MSSQL_USERNAME, MSSQL_PASSWORD are constants with the real parameters.
Example (it works):
===================
Code:
var_dump(mssql_connect(MSSQL_SERVERNAME, MSSQL_USERNAME, MSSQL_PASSWORD));
var_dump(mssql_close());
$f = mssql_fetch_assoc(mssql_query("select getdate();"));
var_dump($f);
Output:
resource(2) of type (mssql link)
bool(true)
NULL
Example (it doesn't work as expected):
======================================
Code:
var_dump($c = mssql_connect(MSSQL_SERVERNAME, MSSQL_USERNAME, MSSQL_PASSWORD));
var_dump(mssql_close($c));
$f = mssql_fetch_assoc(mssql_query("select getdate();", $c));
var_dump($f);
Output:
resource(2) of type (mssql link)
bool(true)
array(1) {
'computed' =>
string(26) "Aug 6 2014 05:18:37:883PM"
}
I believe that it shouldn't have made the query (in fact, mssql_close($c) has returned true, so
the link should be closed).
Can I give you further further information?
Best regards,
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67799&edit=1