database - Error setting multiple db symfony 2.5 -
i'm trying set 2 databases symfony 2.5 project, got error:
fatal error: uncaught exception 'symfony\component\dependencyinjection\exception\invalidargumentexception' message 'the service definition "doctrine.dbal.default_connection" not exist.' \services\vendor\symfony\symfony\src\symfony\component\dependencyinjection\compiler\replacealiasbyactualdefinitionpass.php on line 48 symfony\component\dependencyinjection\exception\invalidargumentexception: service definition "doctrine.dbal.default_connection" not exist. in services\vendor\symfony\symfony\src\symfony\component\dependencyinjection\containerbuilder.php on line 867 symfony\component\dependencyinjection\exception\invalidargumentexception: unable replace alias "doctrine.dbal.default_connection" "database_connection"
here doctrine definition config.yml
doctrine: dbal: default_connection: default connections: default: driver: pdo_mysql host: localhost port: ~ name: db1 user: root password: ~ log: driver: pdo_mysql host: localhost port: ~ name: db2 user: root password: ~
any suggestion?
the error message unable replace alias
when fidling multiple databases hints typo in configuration.
double check configuration using reference: http://symfony.com/doc/current/cookbook/doctrine/multiple_entity_managers.html
Comments
Post a Comment