php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21481 output handler 'ob_gzhandler' cannot be used twice
Submitted: 2003-01-07 02:06 UTC Modified: 2004-07-19 15:52 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mlaukast1 at hotmail dot com Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 4.3.0 OS: Windows 2000 Server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mlaukast1 at hotmail dot com
New email:
PHP Version: OS:

 

 [2003-01-07 02:06 UTC] mlaukast1 at hotmail dot com
Hello!

I call mssql_close function for close connection
but, as I see in php_mssql.c file this function
do nothing (ie don't really closes connection)
see code:
	ZEND_FETCH_RESOURCE2(mssql_ptr, mssql_link *, mssql_link_index, id, "MS SQL-Link", le_link, le_plink);

	if (mssql_link_index) 
  		zend_list_delete(Z_LVAL_PP(mssql_link_index));
	 else 
		zend_list_delete(id);

	RETURN_TRUE;

where is dbclose and dbfreelogin staments?


vladimir
Novosibirsk,
Russia

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-07 04:07 UTC] pvy at novosoft dot ru
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
 [2003-01-07 05:43 UTC] georg@php.net
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 05:48 UTC] nicos@php.net
A little comment to let pvy@novosoft.ru 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-08 03:20 UTC] pvy at novosoft dot ru
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-08 03:21 UTC] pvy at novosoft dot ru
Please, tell me, where in function mssql_close is dbclose call for really close connection to database?


vladimir.
 [2003-01-08 20:42 UTC] fmk@php.net
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.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jan 31 21:05:54 2023 UTC