Skip to content

InvalidArgumentException: There is no extension able to load the configuration for "framework" #4416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
reypm opened this issue May 25, 2012 · 32 comments

Comments

@reypm
Copy link

reypm commented May 25, 2012

Hi, I'm running PHP 5.4.3-1 at Fedora 16 32bits so I try with Symfony 2.0.14 and Symfony 2.0.13, in both cases the .tgz file, uncompress in my ROOT_DIRECTORY at /var/www/html/symfony, set owner to apache:apache recursive for all the directory and set app/cache and app/logs permission to 777 recursively too, and both cases return the same error/issue:

Whoops, looks like something went wrong.

1/1InvalidArgumentException: There is no extension able to load the configuration for "framework" (in /var/www/html/symfony/app/config/config_dev.yml). Looked for namespace "framework", found none
in /var/www/html/symfony/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php line 272
at YamlFileLoader->validate() in /var/www/html/symfony/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php line 242
at YamlFileLoader->loadFile() in /var/www/html/symfony/vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php line 42
at YamlFileLoader->load() in /var/www/html/symfony/vendor/symfony/src/Symfony/Component/Config/Loader/DelegatingLoader.php line 50
at DelegatingLoader->load() in /var/www/html/symfony/app/AppKernel.php line 34
at AppKernel->registerContainerConfiguration() in /var/www/html/symfony/app/bootstrap.php.cache line 863
at Kernel->buildContainer() in /var/www/html/symfony/app/bootstrap.php.cache line 779
at Kernel->initializeContainer() in /var/www/html/symfony/app/bootstrap.php.cache line 513
at Kernel->boot() in /var/www/html/symfony/app/bootstrap.php.cache line 544
at Kernel->handle() in /var/www/html/symfony/web/app_dev.php line 27

Any advice on this?

@bamarni
Copy link
Contributor

bamarni commented May 25, 2012

Could you paste your kernel file? Looks like the frameworkBundle ain't instantiated. In the standard edition config_dev extends config.yml, so the framework config should be in config.yml.

@stof
Copy link
Member

stof commented May 25, 2012

@bamarni the FrameworkBundle config is also in config_dev.yml to activate the profiler. But missing the FrameworkBundle is indeed the most likely reason.

@reypm
Copy link
Author

reypm commented May 25, 2012

@bamarni, @stof: did you need something from me? As I said before I just download the release from www.symfony.com, uncompress and try I didn't touch nothing at code level so if there's any mistake is presented here at git or in the .tgz file.

@bamarni
Copy link
Contributor

bamarni commented May 26, 2012

@paquitodev: compare what you have with https://github.com/symfony/symfony-standard/tree/v2.0.14, especially app/AppKernel.php.

@reypm
Copy link
Author

reypm commented May 26, 2012

Is the same file means the code here at Github is the same as my AppKernel.php code

@greg0ire
Copy link
Contributor

What do you have in your vendor directory? If you have nothing, what did php bin/vendors install output?

@reypm
Copy link
Author

reypm commented May 27, 2012

This: a
assetic
bundles
doctrine
doctrine-common
doctrine-dbal
metadata
monolog
swiftmailer
symfony
twig
twig-extensions
As I said and repeat once more time, I just download the copy from www.symfony.com and uncompress in my local server. The files I have are those one that are presented in the .tgz file so if there is any error maybe come from there. But also I do a php app/vendors --reinstall and the error still

@greg0ire
Copy link
Contributor

There are several tgz on symfony.com one with vendors and another without. Hence my question. Is there any error displayed for any bundle when your run php bin/vendors --reinstall or with any other option?
Additionally, what do you have in the vendor/bundles directory? Sometimes, github fails to respond correctly and the clone fails.

@reypm
Copy link
Author

reypm commented May 27, 2012

Yes I knew that part but I get the tgz with vendors the first one that download when you click in the big download button at home page ;) and no I not get any errors during vendors reinstall process

@reypm
Copy link
Author

reypm commented May 28, 2012

See the output of php bin/vendors install --reinstall

[root@reynierpm-devpc bin]# ./vendors install --reinstall

Installing/Updating symfony
Cloning into '/var/www/html/symfony/vendor/symfony'...
remote: Counting objects: 132572, done.
remote: Compressing objects: 100% (41551/41551), done.
remote: Total 132572 (delta 83438), reused 124292 (delta 76420)
Receiving objects: 100% (132572/132572), 19.74 MiB | 116 KiB/s, done.
Resolving deltas: 100% (83438/83438), done.
adf07f1
HEAD is now at b66b6fc updated VERSION for 2.0.13

Installing/Updating twig
Cloning into '/var/www/html/symfony/vendor/twig'...
remote: Counting objects: 11544, done.
remote: Compressing objects: 100% (3107/3107), done.
remote: Total 11544 (delta 7501), reused 11106 (delta 7108)
Receiving objects: 100% (11544/11544), 1.48 MiB | 112 KiB/s, done.
Resolving deltas: 100% (7501/7501), done.
47e9b95c37d20dd40d94ccbb260bc835b6b1d540
HEAD is now at 6ac8791 prepared the 1.7.0 release

Installing/Updating monolog
Cloning into '/var/www/html/symfony/vendor/monolog'...
remote: Counting objects: 1968, done.
remote: Compressing objects: 100% (756/756), done.
remote: Total 1968 (delta 1082), reused 1884 (delta 1014)
Receiving objects: 100% (1968/1968), 249.57 KiB | 42 KiB/s, done.
Resolving deltas: 100% (1082/1082), done.
2eb0c0978d290a1c45346a1955188929cb4e5db7
HEAD is now at b704c49 Only send FirePHP headers to browser advertising support for it in their user agent

Installing/Updating doctrine-common
Cloning into '/var/www/html/symfony/vendor/doctrine-common'...
remote: Counting objects: 58578, done.
remote: Compressing objects: 100% (14773/14773), done.
remote: Total 58578 (delta 41008), reused 58234 (delta 40691)
Receiving objects: 100% (58578/58578), 15.42 MiB | 91 KiB/s, done.
Resolving deltas: 100% (41008/41008), done.
4ac23ae8737fe7b95a7dd0f1346dbd48c7a503b0
HEAD is now at b886898 Release 2.1.4

Installing/Updating doctrine-dbal
Cloning into '/var/www/html/symfony/vendor/doctrine-dbal'...
remote: Counting objects: 62174, done.
remote: Compressing objects: 100% (15872/15872), done.
remote: Total 62174 (delta 43509), reused 61707 (delta 43068)
Receiving objects: 100% (62174/62174), 16.17 MiB | 112 KiB/s, done.
Resolving deltas: 100% (43509/43509), done.
e537745358e75bb4162939cc9e56aa7a986ea618
HEAD is now at 148a049 Merge remote branch 'origin/2.1.x' into 2.1.x

Installing/Updating doctrine
Cloning into '/var/www/html/symfony/vendor/doctrine'...
remote: Counting objects: 74246, done.
remote: Compressing objects: 100% (18621/18621), done.
remote: Total 74246 (delta 51877), reused 73255 (delta 50967)
Receiving objects: 100% (74246/74246), 17.77 MiB | 121 KiB/s, done.
Resolving deltas: 100% (51877/51877), done.
1f2ce21b5613d0cc2500946afc9553e514314c34
HEAD is now at e164722 Release 2.1.6

Installing/Updating swiftmailer
Cloning into '/var/www/html/symfony/vendor/swiftmailer'...
remote: Counting objects: 9764, done.
remote: Compressing objects: 100% (3323/3323), done.
remote: Total 9764 (delta 5618), reused 9616 (delta 5494)
Receiving objects: 100% (9764/9764), 5.08 MiB | 140 KiB/s, done.
Resolving deltas: 100% (5618/5618), done.
d33d54cc8a081b0b85734744936ede1ba230dd64
HEAD is now at d02e07b prepared the 4.1.7 release

Installing/Updating assetic
Cloning into '/var/www/html/symfony/vendor/assetic'...
remote: Counting objects: 6381, done.
remote: Compressing objects: 100% (2306/2306), done.
remote: Total 6381 (delta 3745), reused 6054 (delta 3465)
Receiving objects: 100% (6381/6381), 741.10 KiB | 31 KiB/s, done.
Resolving deltas: 100% (3745/3745), done.
1a1b5f963db158a1065343fab617d25ce351a2dc
HEAD is now at 4aeef88 updated changelog

Installing/Updating twig-extensions
Cloning into '/var/www/html/symfony/vendor/twig-extensions'...
remote: Counting objects: 325, done.
remote: Compressing objects: 100% (175/175), done.
remote: Total 325 (delta 122), reused 276 (delta 83)
Receiving objects: 100% (325/325), 43.81 KiB, done.
Resolving deltas: 100% (122/122), done.
feb6d3f10c411e2631997c0a905aa581c80305c1
HEAD is now at 446d870 fixed typo

Installing/Updating metadata
Cloning into '/var/www/html/symfony/vendor/metadata'...
remote: Counting objects: 281, done.
remote: Compressing objects: 100% (203/203), done.
remote: Total 281 (delta 132), reused 148 (delta 34)
Receiving objects: 100% (281/281), 36.44 KiB, done.
Resolving deltas: 100% (132/132), done.
a2ae95448bd13bcfbba5f7fead40b379a84da02d
HEAD is now at 8717ad2 release 1.0.0

Installing/Updating SensioFrameworkExtraBundle
Cloning into '/var/www/html/symfony/vendor//bundles/Sensio/Bundle/FrameworkExtraBundle'...
remote: Counting objects: 1205, done.
remote: Compressing objects: 100% (572/572), done.
remote: Total 1205 (delta 656), reused 1108 (delta 576)
Receiving objects: 100% (1205/1205), 150.52 KiB | 77 KiB/s, done.
Resolving deltas: 100% (656/656), done.
e00b525b14784ea4f21c14945e58b4a76a530a6a
HEAD is now at cb61b92 merged branch vatson/2.0 (PR #117)

Installing/Updating JMSSecurityExtraBundle
Cloning into '/var/www/html/symfony/vendor//bundles/JMS/SecurityExtraBundle'...
remote: Counting objects: 1828, done.
remote: Compressing objects: 100% (734/734), done.
remote: Total 1828 (delta 976), reused 1805 (delta 954)
Receiving objects: 100% (1828/1828), 306.21 KiB | 78 KiB/s, done.
Resolving deltas: 100% (976/976), done.
b564463433aed66e9dddad8cbb761afff5a80cb4
HEAD is now at e752f88 closes #61

Installing/Updating SensioDistributionBundle
Cloning into '/var/www/html/symfony/vendor//bundles/Sensio/Bundle/DistributionBundle'...
remote: Counting objects: 551, done.
remote: Compressing objects: 100% (267/267), done.
remote: Total 551 (delta 266), reused 527 (delta 247)
Receiving objects: 100% (551/551), 78.16 KiB, done.
Resolving deltas: 100% (266/266), done.
b35ee4438b4d2351e8115cbf318c461b90fd8c7f
HEAD is now at 20b66a4 fixed version in composer.json

Installing/Updating SensioGeneratorBundle
Cloning into '/var/www/html/symfony/vendor//bundles/Sensio/Bundle/GeneratorBundle'...
remote: Counting objects: 796, done.
remote: Compressing objects: 100% (403/403), done.
remote: Total 796 (delta 423), reused 702 (delta 361)
Receiving objects: 100% (796/796), 132.00 KiB | 75 KiB/s, done.
Resolving deltas: 100% (423/423), done.
0813379920dcaa4b06361501f654379383d75f16
HEAD is now at b1ccb78 merged branch danielsan80/2.0 (PR #111)

Installing/Updating AsseticBundle
Cloning into '/var/www/html/symfony/vendor//bundles/Symfony/Bundle/AsseticBundle'...
remote: Counting objects: 1918, done.
remote: Compressing objects: 100% (575/575), done.
remote: Total 1918 (delta 1164), reused 1871 (delta 1124)
Receiving objects: 100% (1918/1918), 251.85 KiB | 88 KiB/s, done.
Resolving deltas: 100% (1164/1164), done.
61c9f363e73b4ecbb72f81eb62675260a1132048
HEAD is now at 41b5913 Merge pull request #27 from stof/disable_profiler
Installing assets for Symfony\Bundle\FrameworkBundle into /var/www/html/symfony/web/bundles/framework
Installing assets for Acme\DemoBundle into /var/www/html/symfony/web/bundles/acmedemo
Installing assets for Symfony\Bundle\WebProfilerBundle into /var/www/html/symfony/web/bundles/webprofiler
Installing assets for Sensio\Bundle\DistributionBundle into /var/www/html/symfony/web/bundles/sensiodistribution
Clearing the cache for the dev environment with debug true

So no errors there too :(

@bamarni
Copy link
Contributor

bamarni commented May 28, 2012

you don't have to run this command if you downloaded the full package as you said, could you somehow show us the whole code you have (witouth vendors) ?

@reypm
Copy link
Author

reypm commented May 28, 2012

Which code you need?
------Original Message------
From: Bilal Amarni
To: Reynier Perez Mira
Subject: Re: [symfony] InvalidArgumentException: There is no extension able to load the configuration for "framework" (#4416)
Sent: May 28, 2012 1:12 PM

you don't have to run this command if you downloaded the full package as you said, could you somehow show us the whole code you have (witouth vendors) ?


Reply to this email directly or view it on GitHub:
#4416 (comment)

Enviado desde mi BlackBerry de Movistar

@bamarni
Copy link
Contributor

bamarni commented May 28, 2012

your app directory, or the whole code witouth vendors

@reypm
Copy link
Author

reypm commented May 28, 2012

And how? Send you by email? How can I attach a file here?

@bamarni
Copy link
Contributor

bamarni commented May 28, 2012

And how? Send you by email? How can I attach a file here?

Aren't we on github? :)

@reypm
Copy link
Author

reypm commented May 28, 2012

So .... how to achieve this "could you somehow show us the whole code you have (witouth vendors)"??

@reypm
Copy link
Author

reypm commented May 28, 2012

Ok, it's confirmed the problem is with PHP 5.4.x because I downgrade to PHP 5.3.13 and now Symfony 2.0.14 works fine!

@greg0ire
Copy link
Contributor

@paquitodev : you could achieve this by creating a github repository, if you know what that is.
@bamarni: but I doubt it would be helpful, because @paquitodev said he did not modify anything at all. And confirmed the compatibility issue.
Fedora 17 will be out tomorrow, and it includes php 5.4, as you can see here : https://fedoraproject.org/wiki/Releases/17/FeatureList
I am sending this message from a Fedora 16 machine, which I intend to upgrade tomorrow. If I can, I'll see if I reproduce this bug tomorrow.

@bamarni
Copy link
Contributor

bamarni commented May 28, 2012

looks weird, did anybody had this issue with php 5.4? I was using symfony with a 5.4 RC a few months ago and didn't have this issue.

@greg0ire : ok keep us updated ;)

@greg0ire
Copy link
Contributor

Actually, I'm having problems to upgrade : https://bugzilla.redhat.com/show_bug.cgi?id=826272 on my main machine. I won't be able to test this evening. Sorry...

@greg0ire
Copy link
Contributor

I solved my problems and was unable to reproduce this bug on a Fedora 17 with php 5.4.3

@leokolln
Copy link

leokolln commented Jun 1, 2012

I have the exact same problems (including the message) in the same circumstances, but i run PHP 5.4.3 on ArchLinux. check.php is also perfect.

@reypm
Copy link
Author

reypm commented Jun 1, 2012

I can confirm that after update from Fedora 16 to Fedora 17 which come with PHP 5.4.3 all my problems dissapear magically so Symfony it's working now under PHP 5.4.3. Don't know if close the issue or leave open for others like @leokolin who have the same problem

@leokolln
Copy link

leokolln commented Jun 4, 2012

I´m back to work today. Still trying to solve the problem but i have no clue at all.
Doesn't look like a permission issue, tried change the umask() lines, always cleared the cache folders (there are files being created there, so it is not a permission, at least on the cache side). Even tried a 777 from on all the files (including all the parent folders).
Can a apache configuration be the source to the problem?
@paquitodev I see that the problem ceased when you changed the version of the SO, but we didn't find the source of the problem...

@greg0ire
Copy link
Contributor

greg0ire commented Jun 4, 2012

@leokolln: Maybe you could try to do step-by-step debugging with XDebug to find the source of the problem.

@reypm
Copy link
Author

reypm commented Jun 4, 2012

@leokolln Yes my problem ceased after I upgrade from Fedora 16 to Fedora 17 maybe REMI repos miss something at PHP 5.4.3 compilation or I don't know. I was experimenting this problem also with CodeIgniter and some others apps I have in my dev server so the problem is PHP and not the apps. What's the poblem? Don't know really :(

@leokolln
Copy link

leokolln commented Jun 4, 2012

--> config_dev.yml
framework:
router: { resource: "%kernel.root_dir%/config/routing_dev.yml" }
profiler: { only_exceptions: false }

-->--> routing_dev.yml
_configurator:
resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
prefix: /_configurator

-->-->--> webconfigurator.xml:

<route id="_configurator_home" pattern="/">
    <default key="_controller">SensioDistributionBundle:Configurator:check</default>
</route>

<route id="_configurator_step" pattern="/step/{index}">
    <default key="_controller">SensioDistributionBundle:Configurator:step</default>
</route>

<route id="_configurator_final" pattern="/final">
    <default key="_controller">SensioDistributionBundle:Configurator:final</default>
</route>

reading the method at YamlFileLoader.php line 272:
if (!$this->container->hasExtension($namespace)) { ... }

The method is one of those ones:
--> ContainerBuilder.php line 98
public function hasExtension($name)
{
return isset($this->extensions[$name]) || isset($this->extensionsByNs[$name]);
}

or

--> Environment.php line 604
public function hasExtension($name)
{
return isset($this->extensions[$name]);
}

So...
Looking at this i can infer that there is no extension (or not registered) able to load a .xml file.

@leokolln
Copy link

leokolln commented Jun 4, 2012

But how can this sometimes work, some not?

@leokolln
Copy link

leokolln commented Jun 4, 2012

Forget the part about the .xml. I´m still new to Symfony.

Trying to use the app.php/demo returns a code 500 error. Using xdebug i found this: 'There is no extension able to load the configuration for "monolog" (in /srv/http/Symfony/app/config/config_prod.yml). Looked for namespace "monolog", found none'

@leokolln
Copy link

leokolln commented Jun 4, 2012

FOUND IT!
The problem is with the APC PHP extension. I disabled it and the problem is gone.

So, this is the problem, i will still try to discover what is the problem with APC.

@leokolln
Copy link

leokolln commented Jun 4, 2012

Looks like APC is not very stable with PHP5, specially in last versions of it. Do not use it!

@fabpot
Copy link
Member

fabpot commented Jun 13, 2012

Closing this issue. Support should be done on the Symfony mailing-list instead.

For the record, there are some known bugs with APC and PHP 5.4. We have made some workaround for some of them.

@fabpot fabpot closed this as completed Jun 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants