0

我已经安装了具有以下详细信息的 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

看不懂,怎么解决这个问题?

或者问题出在哪里?

4

2 回答 2

0

你跑过吗check.phpconfig.php如中所描述的那样README.md?我还建议将 Symfony 与作曲家一起使用,而不是与供应商一起使用。请检查文档以获得正确的设置。

于 2013-05-21T14:41:39.893 回答
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/console cache:clear 清除缓存(可能也无法正常工作)或手动删除 app/cache 文件夹的内容。

于 2013-05-21T14:35:12.180 回答