I am new to Symfony2 and I have been following the symblog tutorial
But I get this error when I load the homepage
ParameterNotFoundException: You have requested a non-existent parameter "secret".
Where should I check for that whether in config.yml if config.yml in which statement it should be edited.
That parameter will be set in your app/config/parameters.ini
(or .yml on newer versions). Make sure that file exists and looks something like this:
[parameters]
database_driver = pdo_mysql
database_host = localhost
database_port =
database_name = symfony
database_user = root
database_password =
mailer_transport = smtp
mailer_host = localhost
mailer_user =
mailer_password =
locale = en
secret = ThisTokenIsNotSoSecretChangeIt
I had the same problem and it turned out that I added a second imports section in my config.yml. So I removed it and just added my resource in the top imports section at the top of the file and now it works! I was adding the sonata admin service. Hope this helps.
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: @MyBundle/Resources/config/admin.yml }
Instead of the incorrect
imports:
- { resource: parameters.yml }
- { resource: security.yml }
imports:
- { resource: @MMyBundle/Resources/config/admin.yml }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With