Enabling LOAD DATA INFILE feature
Posted by: suri (157.45.66.---)
Date: March 21, 2023 02:47PM

Hi Team,
I have recently installed Wampserver.
My server config:


Apache Version: - Documentation Apache
Server Software:
Apache/2.4.54 (Win64) PHP/8.0.26 mod_fcgid/2.3.10-dev - Port defined for Apache: 80
PHP Version:
[Apache module] 8.0.26 - Documentation PHP - Loaded PHP extensions - Use of PHP versions

[FCGI] 7.4.33 - 8.0.26 - 8.1.13 - 8.2.0 - FCGI mode help
MySQL Version:
8.0.31 - Port defined for MySQL: 3306 - default DBMS - Documentation MySQL
MariaDB Version:
10.10.2 - Port defined for MariaDB: 3307 - Documentation MariaDB - MySQL - MariaDB


PhpInfo status on LOAD DATA FILE feature (which is OFF)


I tried many things
1. mysqli.allow_local_infile = On <in php.ini of 8.0.26 >
2. adding <loose_local_infile=1>, <local_infile=ON>, and <secure_file_priv = ""> in <my.ini of MYSQL config> file. still it shows it is forbidden and I can not change the status.

Please let me know, how can i fix this?


Re: Enabling LOAD DATA INFILE feature
Posted by: Otomatic (Moderator)
Date: March 21, 2023 03:08PM


In this case, do RTFM in the MySQL documentation, do a search on LOAD DATA INFILE and find :
6.1.6 Security Considerations for LOAD DATA LOCAL

MySQL enables clients to restrict local data loading operations to files located in a designated directory.
Restricting Files Permitted for Local Data Loading

See also :
my.ini secure_file_priv
my.ini local_infile

I can't tell you more, as I didn't do a load date infile.

Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Sorry, only registered users may post in this forum.