2022-04-24
70707
67
6842
1 minutes.


Error LOAD DATA LOCAL INFILE appears when uploading to the site

Error message appears when uploading to the site
error! Need mode LOAD DATA LOCAL INFILE! Variable local_infile: OFF



This message means that the mode of loading data from files is disabled on your hosting server for MySQL DBMS. The E-Trade Tunnel module uses the MySQL LOAD DATA LOCAL INFILE command, which reads lines from a text file and inserts them into a temporary table at a very high speed, the file is read from the client host, that is, from the secure host on which the E-Trade Tunnel module is installed and your website.

Solutions to the problem

1. In the php. ini file, write
mysqli. allow_local_infile = On

2. Write the line local-infile=ON in the config file my. cnf in the [mysqld] [mysql] section.

Approximate file path
/etc/my. cnf
or
/etc/mysql/my. cnf

Sections in a file
[mysqld]
local-infile=ON

[mysql]
local-infile=ON

After that, you need to restart MySQL, for example with the service mysql restart command.

Mode check command: SHOW VARIABLES LIKE 'local_infile'

Another solution to the problem is to install the native mysql driver instead of php5-mysql, the command for Debian OS is:

apt-get install php5-mysqlnd

mysqli_query() error: LOAD DATA LOCAL INFILE forbidden
It is necessary to change the mysqli. allow_local_infile parameter in the php. ini file (by default it is commented out with a semicolon)
mysqli. allow_local_infile = On

Installing the zip extension for PHP
yum install php-zip
service httpd restart
service nginx restart

BitrixVM
yum install php-pecl-zip
service httpd restart


Description of products


Copywriter ElbuzGroup


Contents:



Save a link to this article