Why i have this problem?
Warning: PDO::query(): LOAD DATA LOCAL INFILE forbidden in /srv/www/project/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php on line 742
Thats my configuration.
#app/config/config.yml
doctrine:
dbal:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name%
user: %database_user%
password: %database_password%
charset: UTF8
options:
"PDO::MYSQL_ATTR_LOCAL_INFILE": true
orm:
auto_generate_proxy_classes: %kernel.debug%
auto_mapping: true
I tried the options without leading
.
AND if i use this, it works great!
/* @var DoctrineDBALConnection $connection */
$dbhost = $this->getContainer()->getParameter('database_host');
$dbuser = $this->getContainer()->getParameter('database_user');
$dbpass = $this->getContainer()->getParameter('database_password');
$dbname = $this->getContainer()->getParameter('database_name');
$connection = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $dbuser, $dbpass, array(PDO::MYSQL_ATTR_LOCAL_INFILE => true));
How i can use doctrine from symfony2 instead the own new PDO $connection.
I dont know why doctrine ignore the options... Or cant Doctrine convert the options to the Constant/Integer?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…