largeCSV2mySQL icon indicating copy to clipboard operation
largeCSV2mySQL copied to clipboard

PHP Warning: mysqli_query(): LOAD DATA LOCAL INFILE forbidden in

Open tarasiadis opened this issue 4 years ago • 4 comments

It works great on my setup this script but last month I get below error

PHP Warning: mysqli_query(): LOAD DATA LOCAL INFILE forbidden in

Is there any update on it?

tarasiadis avatar Apr 01 '20 16:04 tarasiadis

Same issue here. Anyone able to resolve this?

carlcarlsoniv avatar Sep 08 '20 13:09 carlcarlsoniv

I had this problem today and solved it by setting the following in php.ini

mysqli.allow_local_infile = On

nunespe avatar Dec 03 '20 20:12 nunespe

Basically you need:

PDO::MYSQL_ATTR_LOCAL_INFILE => true

Set at instantiation.

https://stackoverflow.com/questions/7638090/load-data-local-infile-forbidden-in-php

jamesboy avatar Mar 10 '21 09:03 jamesboy

Hi, I get the same error using Adminer to execute a sql LOAD DATA LOCAL INFILE, I try to set the variable mysqli.allow_local_infile = on in my /etc/php/7.4/apache2/php.ini directory and stop/start the apache2 service, but it doesn't work Any suggest? Thank you, Gianpiero

gpf70sax avatar Nov 15 '23 11:11 gpf70sax