PHP 4.0 Bug #7871: mysql_close() work only after second call

From: Date: Sat, 18 Nov 2000 12:47:42 +0000
Subject: PHP 4.0 Bug #7871: mysql_close() work only after second call
Groups: php.dev 
Request: Send a blank email to php-dev+get-38461@lists.php.net to get a copy of this message
From: giese@foreach.de Operating system: Linux 2.2.16 PHP version: 4.0.3pl1 PHP Bug Type: MySQL related Bug description: mysql_close() work only after second call 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 -- Edit Bug report at: http://bugs.php.net/?id=7871&edit=1

« previous php.dev (#38461) next »