MariaDB/MySql server – load data infile

When using php7.2 and onward make sure you are having:
mysqli.allow_local_infile = On
in php.ini setup or uncommented.

Otherwise this will not work. I’ve spent 2 days trying to make it working on mariaDB config file because few years ago I had the same problems and most of it were on DB end (optimization) but now this totally surprised me. It was on php end.

This is really nice stuff. Check it

https://stackoverflow.com/questions/13016797/load-data-local-infile-fails-from-php-to-mysql-on-amazon-rds?rq=1

Please not…ini_set is not always working so you might need to change allow_local_infile directly to the server’s php.ini for specific php version. I’m using directadmin almost every day. Have 3 php versions installed and testing everything there.

Leave a Reply

Your email address will not be published. Required fields are marked *