[php-src] PR #19750: Fix bug #67563: mysqli compiled with mysqlnd does not take ipv6 adress as parameter

From: Date: Sun, 07 Sep 2025 19:12:51 +0000
Subject: [php-src] PR #19750: Fix bug #67563: mysqli compiled with mysqlnd does not take ipv6 adress as parameter
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-33128@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/19750 Author: nielsdos In the past, when libmysqlclient could be used, it accepted ipv6 addresses as hostname without enclosing it first in brackets. However, in mysqlnd this never worked. In the past this caused a discrepancy between the two implementations. Nowadays, mysqli only works with mysqlnd so we don't even have to cater to libmysqlclient. However, a plain ipv6 address should still work as a hostname. Also for people migrating to newer PHP versions it's nice if this keeps working. The solution is to check if we're dealing with an ipv6 address not yet enclosed in brackets. In that case we add the brackets automatically. --- Testing this automatically seems not straight-forward. The connection string is not logged. Using the fake server requires modifications to specify a host and can't be easily reused in the same phpt file. This was tested by hand.

« previous php.git-pulls (#33128) next »