You are not logged in.
After upgrading from php 8.4.14 to 8.4.15 yesterday, my IPv6 DB connection no longer works.
When trying to establish a PDO connection to a mariadb server using an IPv6 address, I get the error:
SQLSTATE[HY000] [2002] Failed to parse IPv6 address "[::1]"
The connection worked fine on php 8.4.14. I don't see anything in the php 8.4.15 changelog that would cause this, so I'm wondering if this build is missing IPv6 support or something. I also tried other non-localhost IPv6 addresses and get the same error.
Sample code:
$conn = new PDO(
"mysql:host=[::1];charset=utf8mb4",
$username,
$password
);
Offline
do you have the below lines in your /etc/hosts ?
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allroutersIf not, does it help if you add them ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I did not have those lines, but adding them and restarting php-fpm.service did not help.
Offline
Should be fixed by 9d71c1e Fix GH-20528: Regression breaks mysql connexion using an IPv6 address enclosed in square brackets.
Last edited by loqs (2025-11-21 21:07:21)
Offline