PHP-MySQLi-Database-Class icon indicating copy to clipboard operation
PHP-MySQLi-Database-Class copied to clipboard

MYSQLI_OPT_LOCAL_INFILE Error

Open adrianlaraperez88 opened this issue 5 years ago • 3 comments

i need add this : mysqli_options($conn, MYSQLI_OPT_LOCAL_INFILE, true); We have in this class fixed this error: i need add this : mysqli_options($conn, MYSQLI_OPT_LOCAL_INFILE, true);

Unprepared Query Failed, ERRNO: 2000 (LOAD DATA LOCAL INFILE is forbidden, check mysqli.allow_local_infile

I do not have access into php.ini.

adrianlaraperez88 avatar Apr 16 '20 15:04 adrianlaraperez88

Maybe this is a solution if not have: https://www.php.net/manual/en/mysqli.options.php

mysqli_options($mysqli,MYSQLI_OPT_LOCAL_INFILE,1); please I need know if this class have this option.

adrianlaraperez88 avatar Apr 16 '20 16:04 adrianlaraperez88

you can use $mysqlidb->mysqli() function to get mysqli object and set options there

avbdr avatar Apr 16 '20 16:04 avbdr

yeah i see this:

$mysqli->options(MYSQLI_OPT_LOCAL_INFILE, 1);

but maybe it is a good add function for set this option.

adrianlaraperez88 avatar Apr 16 '20 16:04 adrianlaraperez88