Symfony2无法导入资源

时间:2013-01-26 03:10:46

标签: php symfony yaml

安装供应商文件时,Symfony应用程序会抛出以下错误

[Symfony\Component\Config\Exception\FileLoaderLoadException]                          
Cannot import resource "/var/www/test/app/config/parameters.yml" from "/var  
/www/test/app/config/config.yml".                                            


[Symfony\Component\Yaml\Exception\ParseException]                                     
Unable to parse in "\/var\/www\/test\/app\/config\/parameters.yml" at line   
2 (near "database_driver   = pdo_mysql").

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception      


[RuntimeException]                                                         
An error occurred when executing the "'cache:clear --no-warmup'" command.

我的导入有什么问题?

2 个答案:

答案 0 :(得分:7)

您的parameters.yml文件不是有效的YAML。它应该是

database_driver: pdo_mysql

不是=签名

答案 1 :(得分:0)

如果您无法在错误消息中使用cache:clear命令,则可以手动执行此操作

sudo rm -rf app/cache/*