PropelException: No connection params set for propel
August 17th, 2007
I upgraded to a newer version of Symfony today (v1.0.6) and had a hell of time getting the trivial task of connecting to the database working.
I was able to obtain a connection, by doing
$databaseManager = new sfDatabaseManager();
$databaseManager->initialize();
$con = $databaseManager->getDatabase('propel');
but that’s not the ideal way, and not the way symfony gets the database handle.
on the otherhand throws an excpetion.
$con = Propel::getConnection('propel');
First, it was important to check that config/schema.xml is correct
And that config/databases.yml has a connection profile for propel
All that was good. But for some reason sfPropelAutoload was not geting loaded.
If I manually included it
include './lib/symfony-1.0.7/lib/addon/propel/sfPropelAutoload.php'It was clearly listed in the autoloader.yml
it would work, but still not desirable.
The following was in my autoloader config,
but it still wouldn’t load my sfPropelAutoload class. Adding the following made it start working…
add to del.icio.us
add to technorati favs
email this
July 3rd, 2008 at 2:30 pm
Thanks.
you are the first one that solve my fucking problem.
Good post.