Blog Image

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.



Author: admin

Vinod Ram has been in Software Industry since 2006 and has experience of over 16 years in Software Development & Project Management domain specialised majorly in LAMP stack & Open Source Technology, building enterprise level Web based Application, Large Database driven and huge traffic Websites and Project Management. He loves to write information articles and blog to share his knowledge and experience with the outside world and help people to find solution for their problems.