Skip to content

Commit 4f0a05a

Browse files
committed
Merge branch 'PHP-5.6' into PHP-7.0
2 parents 96406f0 + 66c1f96 commit 4f0a05a

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

ext/mysqli/tests/bug68077.phpt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ require_once('skipifconnectfailure.inc');
77
if (!$IS_MYSQLND) {
88
die("skip: test applies only to mysqlnd");
99
}
10+
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
11+
die("skip Cannot connect to MySQL");
12+
13+
include_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+
17+
mysqli_close($link);
1018
?>
1119
--INI--
12-
open_basedir={PWD}
20+
open_basedir=
1321
--FILE--
1422
<?php
1523
require_once("connect.inc");
1624

25+
ini_set("open_basedir", __DIR__);
1726
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
1827
printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
1928
}
@@ -39,7 +48,8 @@ open_basedir={PWD}
3948
echo "done\n";
4049
}
4150

42-
if (!$link->query("LOAD DATA LOCAL INFILE '../../bug53503.data' INTO TABLE test")) {
51+
ini_set("open_basedir", __DIR__ . "/dummy");
52+
if (!$link->query("LOAD DATA LOCAL INFILE '" . __DIR__ . "/bug53503.data' INTO TABLE test")) {
4353
printf("[006] [%d] %s\n", $link->errno, $link->error);
4454
echo "done\n";
4555
} else {

0 commit comments

Comments
 (0)