]> granicus.if.org Git - php/commitdiff
Skip bug77956.phpt if local_infile disabled on server
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 27 Dec 2019 15:31:34 +0000 (16:31 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 27 Dec 2019 16:25:53 +0000 (17:25 +0100)
ext/mysqli/tests/bug77956.phpt

index b3c7943c93cba1f9e6d7c18d1b99d8db45278355..6c752299d46890974ecb64e32ea1a8ad070e3d26 100644 (file)
@@ -4,6 +4,16 @@ ensure an error is returned when mysqli.allow_local_infile is off
 <?php
 require_once('skipif.inc');
 require_once('skipifconnectfailure.inc');
+
+$link = mysqli_init();
+if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
+       die(sprintf("skip Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+}
+
+require_once('local_infile_tools.inc');
+if ($msg = check_local_infile_support($link, $engine))
+       die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
+
 ?>
 --INI--
 mysqli.allow_local_infile=0