-
Notifications
You must be signed in to change notification settings - Fork 8k
Expand file tree
/
Copy pathbug67563.phpt
More file actions
37 lines (32 loc) · 977 Bytes
/
bug67563.phpt
File metadata and controls
37 lines (32 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--TEST--
Fix bug #67563 (mysqli compiled with mysqlnd does not take ipv6 adress as parameter)
--EXTENSIONS--
mysqli
--SKIPIF--
<?php
require_once 'connect.inc';
if (@stream_socket_client('udp://[::1]:8888') === false)
die('skip no IPv6 support');
if (!$link = @my_mysqli_connect('[::1]', $user, $passwd, $db, $port, $socket)) {
die(sprintf("SKIP Cannot connect to the server using host=[::1], user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$user, $db, $port, $socket));
}
?>
--INI--
max_execution_time=240
--FILE--
<?php
require_once 'connect.inc';
$hosts = ['::1', "[::1]:$port"];
foreach ($hosts as $host) {
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=%s dbname=%s, port=%s, socket=%s\n",
$host, $user, $passwd, $db, $port, $socket);
} else {
$link->close();
}
}
print "done!";
?>
--EXPECT--
done!