【发布时间】:2015-02-22 19:41:40
【问题描述】:
我正在尝试开始使用 Symfony 2,因此我开始阅读并遵循 jobeet 教程。当我尝试使用此命令“php app/console dictionary:database:create”创建数据库时遇到问题,我收到此错误:
Symfony\Component\Config\Exception\FileLoaderLoadException]
here is no extension able to load the configuration for "database_driver" (in C:\wamp\www\jobeet\app/config\parameters.yml). Looked for namespace "databas
_driver", found "framework", "security", "twig", "monolog", "swiftmailer", "assetic", "doctrine", "sensio_framework_extra", "oc_platform", "ens_jobeet", "
ebug", "acme_demo", "web_profiler", "sensio_distribution" in C:\wamp\www\jobeet\app/config\parameters.yml (which is being imported from "C:\wamp\www\jobee
\app/config\config.yml").
Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
here is no extension able to load the configuration for "database_driver" (in C:\wamp\www\jobeet\app/config\parameters.yml). Looked for namespace "databas
_driver", found "framework", "security", "twig", "monolog", "swiftmailer", "assetic", "doctrine", "sensio_framework_extra", "oc_platform", "ens_jobeet", "
ebug", "acme_demo", "web_profiler", "sensio_distribution"
这是我的parameters.yml文件内容:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: null
database_name: jobeet
database_user: root
database_password: null
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: en
secret: ThisTokenIsNotSoSecretChangeIt
如果有人可以帮助我,我将不胜感激。
【问题讨论】:
-
你能发布你的parameters.yml文件吗?
-
我将parameters.yml 文件内容添加到我的问题中
-
您是否安装了 MySQL php 扩展? (在 ubuntu 上,试试
sudo apt-get install php-mysql) -
您的参数看起来不错,错误消息
databas_driver中有错字(缺少“e”)可能是因为这个。重新检查您的参数并清除缓存。