Skip to content

Commit 23d4659

Browse files
committed
Skip bug77956.phpt if local_infile disabled on server
1 parent 6572d91 commit 23d4659

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ext/mysqli/tests/bug77956.phpt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ ensure an error is returned when mysqli.allow_local_infile is off
44
<?php
55
require_once('skipif.inc');
66
require_once('skipifconnectfailure.inc');
7+
8+
$link = mysqli_init();
9+
if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
10+
die(sprintf("skip Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
11+
}
12+
13+
require_once('local_infile_tools.inc');
14+
if ($msg = check_local_infile_support($link, $engine))
15+
die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
16+
717
?>
818
--INI--
919
mysqli.allow_local_infile=0

0 commit comments

Comments
 (0)