1--TEST--
2mysqli_options() - MYSQLI_OPT_LOCAL_INFILE and open_basedir
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11require_once('connect.inc');
12ini_set("open_basedir", __DIR__);
13if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
14    printf("[001] Cannot connect, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
15
16if ($IS_MYSQLND) {
17    if (true !== mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, 1))
18        printf("[002] Can not set MYSQLI_OPT_LOCAL_INFILE although open_basedir is set!\n");
19
20} else {
21    if (false !== mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, 1))
22        printf("[002] Can set MYSQLI_OPT_LOCAL_INFILE although open_basedir is set!\n");
23
24}
25mysqli_close($link);
26print "done!";
27?>
28--EXPECT--
29done!
30