php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7871 mysql_close() work only after second call
Submitted: 2000-11-18 07:47 UTC Modified: 2000-11-19 13:54 UTC
From: giese at foreach dot de Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0.3pl1 OS: Linux 2.2.16
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: giese at foreach dot de
New email:
PHP Version: OS:

 

 [2000-11-18 07:47 UTC] giese at foreach dot de
calling mysql_close() in order to close the mysql-connection and kill the mysql-process dont work. calling mysql_close() a second time closed the connection. 
mysql_close(link_identifier) doesnt work. doesnt matter how often i called it.

i tested it with a little script:

$con=mysql_connect("localhost","***","***");
$result=mysql_db_query("chat","select * from chat",$con);
mysql_close();
while($i<10){
    echo "$i <br>";
    flush();
    sleep(1);
    $i++;
}

if you now make a mysqladmin processlist you see a process wich is sleeping for 10 seconds. 
when the scripts ends the mysql-process is gone. 
the same script with calling mysql_close() two times lets the mysql-process go away right as i expected. mysql_close($con) never worked. 
calling mysql_close() a third time produces an error message. calling first mysql_close($con) and then mysql_close() does nothing, too. 

mysql-server-version is 3.22.32

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-19 13:54 UTC] giese at foreach dot de
created new bug report # 7879
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 30 03:01:31 2024 UTC