I try to do this code:
$conn = mysqli_init();
mysqli_options($conn, MYSQLI_OPT_LOCAL_INFILE, true);
mysqli_real_connect($conn,'{HOST}','{USERNAME}','{PASSWD}','{DBNAME}');
$x = mysqli_query($conn, "LOAD DATA LOCAL INFILE '/var/www/sample.txt' INTO TABLE temp");
if($x){
echo "OK";
}else{
echo mysqli_error($conn);
}
and i have this error:
The used command is not allowed with this MariaDB version
On server MariaDB, but it's not mean - just public fork of MySQL. So, i have in php.ini on client:
mysqli.allow_local_infile = 1
mysql.allow_local_infile = 1
I have on server:
SHOW GLOBAL VARIABLES LIKE 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile | ON |
+---------------+-------+
1 row in set (0.023 sec)
What's wrong and how to resolve it ?