This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

symfony 1.4 - import csv file with "LOAD DATA LOCAL INFILE"

Discussion relating to version 1.3.x and 1.4.x

symfony 1.4 - import csv file with "LOAD DATA LOCAL INFILE"

by white-bear » Sun Sep 07, 2014 11:19 am

Hello symfony mates,

i developing a big system that םמק of the features is ability to populate several of the DB tables with CSV files,

i'm tried to use a loop that do insert with each row but a file with 65,000 records take me more then 20 min (!).

i decided i want to use the mysql command "LOAD DATA LOCAL INFILE" but my issue is that i received this message :

"LOAD DATA LOCAL INFILE forbidden in C:\xampp\htdocs\Bridge\apps\backend\modules\member\actions\actions.class.php on line 112"

after a little research i understand i need to change one of the security parameters of the PDO that called : PDO::MYSQL_ATTR_LOCAL_INFILE to true.

i found how to do it in symfony2 at the config.yml but not on symfony 1.4. i search the web like crazy ! can someone please be my saver ?!?
Junior Member
Posts: 2
Joined: Sun Sep 07, 2014 11:07 am