Re: [Discuss] Add PDO disconnect() and isConnected()

From: Date: Sun, 19 Oct 2025 19:06:25 +0000
Subject: Re: [Discuss] Add PDO disconnect() and isConnected()
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-128867@lists.php.net to get a copy of this message
Hi

On 10/1/25 16:45, AllenJB wrote:
As I understand it, at least in the case of MySQL, the state of persistent connections is not managed by MySQL, but by the client (PHP). This means that it's (at least theoretically) possible for a connection to end up in an undesirable state, in which case there should be a way to close it so it's not reused.
I have filed https://github.com/php/php-src/issues/20225. I am not sufficiently knowledgeable about PDO, MySQLnd and MySQL itself to implement it myself, but it should not be particularly hard and I think it would greatly improve safety of using persistent connections with MySQL. Best regards Tim Düsterhus

Thread (22 messages)

« previous php.internals (#128867) next »