--TEST-- Killing a persistent connection. --EXTENSIONS-- mysqli --SKIPIF-- --INI-- mysqli.allow_persistent=1 mysqli.max_persistent=2 --FILE-- getMessage() . "\n"; } if (!$plink = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[011] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); if (!$res3 = @mysqli_query($plink, 'SELECT id FROM test ORDER BY id LIMIT 1')) { printf("[012] New persistent connection cannot execute queries, [%d] %s\n", @mysqli_errno($plink), @mysqli_error($plink)); } @mysqli_free_result($res3); @mysqli_close($plink); mysqli_close($link); // remove the "p:" from the host variable $host = substr($host, 2); if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[013] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); if (!$res4 = mysqli_query($link, 'SELECT id FROM test ORDER BY id LIMIT 1')) printf("[014] New regular connection cannot execute queries, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); mysqli_free_result($res4); mysqli_close($link); print "done!"; ?> --CLEAN-- --EXPECT-- mysqli object is already closed done!