ID: 21481 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: MSSQL related Operating System: windows 2000/sp3 PHP Version: 4CVS-2003-01-07 (stable) New Comment:
dbclose is called indirectly when the link is destroyed (_close_mssql_link and _close_mssql_plink). Setting mssql.allow_persistent to off indicates that you are using the mssql_pconnect function and not the mssql_connect. Previous Comments: ------------------------------------------------------------------------ [2003-01-08 03:21:16] [EMAIL PROTECTED] Please, tell me, where in function mssql_close is dbclose call for really close connection to database? vladimir. ------------------------------------------------------------------------ [2003-01-08 03:20:04] [EMAIL PROTECTED] Sorry, this is my mistype. in my test script all was fine. and, also, I reopen this bug report. When 25 connections was reached, no new connection will open. Then I change option "allow persistant" to Off in php.ini. All working fine. I assume this is not a bogus, this is a bug. ------------------------------------------------------------------------ [2003-01-07 05:48:56] [EMAIL PROTECTED] A little comment to let [EMAIL PROTECTED] knows that his script is bogus: <? $db=mssql_connect("server","user","pass"); mssql_close("db"); ?> should be <? $db=mssql_connect("server","user","pass"); mssql_close($db); ?> Thank you for your report. ------------------------------------------------------------------------ [2003-01-07 05:43:01] [EMAIL PROTECTED] In the db extensions connections will be closed via destructor functions, which will be called when zend_list_delete is executed: see: PHP_MINIT_FUNCTION and _close_[extname]_link ------------------------------------------------------------------------ [2003-01-07 04:07:18] [EMAIL PROTECTED] And also: If I create file like this: <? $db=mssql_connect("server","user","pass"); mssql_close("db"); ?> and run it a lot of times, after 25 times I got message "unable connect to server" from mssql_connect when I go to mssql entreprise manager I will see 25 connections from PHP. If I restart apache all connections will be closed. PS: I use apache 1.3.27/w32 Same behavior with all databases, as I understand, there is another childs logic instead unix. Waiting for comments ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/21481 -- Edit this bug report at http://bugs.php.net/?id=21481&edit=1