|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-10-15 23:18 UTC] kalle@php.net
-Status: Open
+Status: Wont fix
[2016-10-15 23:18 UTC] kalle@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 15:00:01 2025 UTC |
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,