我已经安装了WAMP服务器,其中包含以下详细信息
1. Apache httpd 2.2.22
2. PHP 5.4.3
3. MySQL 5.5.24
我想在此运行Symfony2,所以我下载了这个
Symfony_Standard_Vendors_2.2.1
并尝试从中提出申请
我收到了以下错误
1/1 InvalidArgumentException: There is no extension able to load the configuration for "framework" (in D:\Program files\wamp\www\Symfony\app/config/config_dev.yml). Looked for namespace "framework", found "security", "twig", "monolog", "swiftmailer", "assetic", "doctrine", "sensio_framework_extra", "jms_aop", "jms_di_extra", "jms_security_extra", "acme_demo", "web_profiler", "sensio_distribution"
in D:\Program files\wamp\www\Symfony\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Loader\YamlFileLoader.php line 268
at YamlFileLoader->validate(array('imports' => array(array('resource' => 'config.yml')), 'framework' => array('router' => array('resource' => '%kernel.root_dir%/config/routing_dev.yml'), 'profiler' => array('only_exceptions' => false)), 'web_profiler' => array('toolbar'
=> true, 'intercept_redirects' => false), 'monolog' => array('handlers' => array('main' => array('type' => 'stream', 'path'
=> '%kernel.logs_dir%/%kernel.environment%.log', 'level' => 'debug'), 'firephp' => array('type' => 'firephp', 'level' => 'info'), 'chromephp' => array('type' => 'chromephp', 'level' => 'info'))), 'assetic' => array('use_controller' => true)), 'D:\Program files\wamp\www\Symfony\app/config/config_dev.yml') in D:\Program files\wamp\www\Symfony\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Loader\YamlFileLoader.php line 238
at YamlFileLoader->loadFile('D:\Program files\wamp\www\Symfony\app/config/config_dev.yml') in D:\Program files\wamp\www\Symfony\vendor\symfony\symfony\src\Symfony\Component\DependencyInjection\Loader\YamlFileLoader.php line 42
at YamlFileLoader->load('D:\Program files\wamp\www\Symfony\app/config/config_dev.yml', null) in D:\Program files\wamp\www\Symfony\vendor\symfony\symfony\src\Symfony\Component\Config\Loader\DelegatingLoader.php line 52
at DelegatingLoader->load('D:\Program files\wamp\www\Symfony\app/config/config_dev.yml') in D:\Program files\wamp\www\Symfony\app\AppKernel.php line 36
at AppKernel->registerContainerConfiguration(object(DelegatingLoader)) in D:\Program files\wamp\www\Symfony\app\bootstrap.php.cache line 653
at Kernel->buildContainer() in D:\Program files\wamp\www\Symfony\app\bootstrap.php.cache line 593
at Kernel->initializeContainer() in D:\Program files\wamp\www\Symfony\app\bootstrap.php.cache line 378
at Kernel->boot() in D:\Program files\wamp\www\Symfony\app\bootstrap.php.cache line 409
at Kernel->handle(object(Request)) in D:\Program files\wamp\www\Symfony\web\app_dev.php line 26
无法理解,如何解决这个问题?
或问题在哪里?
答案 0 :(得分:0)
如果您忘记注册捆绑包并已将特定于捆绑包的配置放入 app / config / config.yml ,则通常会抛出此类错误。
“框架”配置命名空间由FrameworkBundle提供。
请确保您在 app / AppKernel.php
中注册了FrameworkBundle<?php
[...]
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
[...]
请同时使用应用/控制台缓存清除缓存:清除(可能无法正常工作)或手动删除app / cache文件夹的内容。
答案 1 :(得分:0)
您是否已在check.php
中详细描述了config.php
,README.md
?我还建议将Symfony与作曲家一起使用,而不是与供应商一起使用。请检查the documentation以获取正确的设置。