Symfony2 error after configuration

Installation and environment issues, mainly on 1.x but there's some 2.x here too.

Moderators: dwhittle, Ian

Symfony2 error after configuration

Postby zkinner » Wed Mar 23, 2011 8:42 am

Hi Im just downloaded and unpacked symfony2 than opened configuration page, entered login pass of my Mysql DB and then i've got this error:
Code: Select all
 Fatal error: Uncaught exception 'InvalidArgumentException' with message 'The parameter "templating.engines" must be defined


What's wrong?
zkinner
Junior Member
 
Posts: 26
Joined: Sun Mar 15, 2009 11:56 pm

Re: Symfony2 error after configuration

Postby zkinner » Wed Mar 23, 2011 10:28 am

The error line is

Code: Select all
  $engines = $container->getParameterBag()->resolveValue($container->getParameter('templating.engines'));
     
zkinner
Junior Member
 
Posts: 26
Joined: Sun Mar 15, 2009 11:56 pm

Re: Symfony2 error after configuration

Postby astrac » Wed Mar 23, 2011 2:42 pm

In your app config.yml you should have something like this:
Code: Select all
framework:
    charset:       UTF-8
    error_handler: null
    csrf_protection:
        enabled: true
        secret: %csrf_secret%
    router:        { resource: "%kernel.root_dir%/config/routing.yml" }
    validation:    { enabled: true, annotations: true }
    templating:    { engines: ['twig'] } #assets_version: SomeVersionScheme
    session:
        default_locale: %locale%
        lifetime:       3600
        auto_start:     true


As you can see I configure the templating.engines parameter passing an array that enable the twig engine (if you need it you can add php too).
astrac
Member
 
Posts: 75
Joined: Mon Jan 24, 2011 1:16 pm

Re: Symfony2 error after configuration

Postby zkinner » Wed Mar 23, 2011 5:01 pm

Problem was solved by rebooting server. Something was wrong with PECL i think
zkinner
Junior Member
 
Posts: 26
Joined: Sun Mar 15, 2009 11:56 pm


Return to Installation and setup

Who is online

Users browsing this forum: No registered users and 1 guest