Re: [RFC] [Discussion] Minimum supported versions for PHP 8.6

From: Date: Fri, 03 Jul 2026 14:03:10 +0000
Subject: Re: [RFC] [Discussion] Minimum supported versions for PHP 8.6
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-131733@lists.php.net to get a copy of this message
On Fri, Jul 3, 2026 at 7:32 AM <go.al.ni@gmail.com> wrote: > > > Is this true? > > It's not true. Sorry about that. Script didn't crash. > > But something worse happened. > > I took sources from > > https://github.com/ericnorris/php-src/archive/refs/heads/feat-mysqlnd-com-reset-connection.zip > Configured them with `--enable-mysqlnd --enable-fpm > --with-fpm-user=www-data --with-fpm-group=www-data --enable-pdo > --with-pdo-mysql=mysqlnd` > Up mysql 5.5.61. > Started php-fpm with pm = static and gzdD¼ > ‹+öœ:q{Úì†pm.max_children = 1. > Ran this script: > > ```php > <?php > $pdo = new PDO('mysql:host=172.17.0.1', 'root', '', > [PDO::ATTR_PERSISTENT => true]); > $q = $pdo->query('SHOW PROCESSLIST'); > $rows = 0; > while ($f = $q->fetch(PDO::FETCH_ASSOC)) { > $rows++; > } > echo $rows . PHP_EOL; > ``` > > On the first execution script echoes 1. On the second - 2. Each > execution increments the counter by one. When I restart the php-fpm > process, the counter restarts again from 1. There is connection leak > here! > > When I removed PDO::ATTR_PERSISTENT, the counter stop > increasing. > When I switched to mysql 8, counter was always 1 (both with and > without persistent connections). Thank you for identifying a connection leak; I have identified the cause and I'm considering how to address it. That said, I don't believe this is inherent to the RFC, instead I would consider this a bug in my implementation.

« previous php.internals (#131733) next »