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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

History

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