简体   繁体   English

Symfony2无法导入资源

[英]Symfony2 Unable to Import Resource

Symfony application throws the following error when I install vendor files 安装供应商文件时,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.

What's wrong with my import? 我的导入有什么问题?

Your paramteres.yml file is not a valid YAML. 您的paramteres.yml文件不是有效的YAML。 It should be 它应该是

database_driver: pdo_mysql

Not = sign =签名

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

sudo rm -rf app/cache/*

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM