Day: April 5, 2008

No connection params set for propel

When you are using symfony framework , and when you get the error as

“No connection params set for propel” ,Do the following changes .

In config /databases.yml file

Replace

all:
propel:
class: sfPropelDatabase
param:
datasource: symfony
dsn: mysql://root:@localhost/mywebsite

with

all:
propel:
class: sfPropelDatabase
param:
phptype: mysql
host: localhost
database: databaseName
username: root
password: password
dsn: mysql://root:password@localhost/databaseName
datasource: propel

In config/propel.ini

Replace

propel.targetPackage = lib.model
propel.packageObjectModel = true
propel.project = projectFolderName
propel.database = mysql
propel.database.createUrl = mysql://root:password@localhost/databaseName
propel.database.url = mysql://root:password@localhost/databaseName

with

propel.targetPackage = lib.model
propel.packageObjectModel = true
propel.project = projectFolderName
propel.database = mysql
propel.database.createUrl = mysql://localhost/
propel.database.url = mysql://root:password@localhost/databaseName

This will rectify your problem.