logo
Ask your Symfony questions! Pay money and get answers fast! (more info)

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.

$10
Propel Exception: No connection params set for propel

Symfony version 1.0.20.

I am getting the following error:


[PropelException]
No connection params set for propel

stack trace
at ()
in SF_SYMFONY_LIB_DIR/vendor/propel/Propel.php line 476 ...

$dsn = isset(self::$configuration['datasources'][$name]['connection']) ? self::$configuration['datasources'][$name]['connection'] : null;

if ($dsn === null) {

throw new PropelException("No connection params set for " . $name);

}


include_once 'creole/Creole.php';
at Propel::getConnection('propel')
in SF_ROOT_DIR/lib/model/om/BaseZorMicrosoftContentPeer.php line 202 ...
at BaseZorMicrosoftContentPeer::doSelectRS(object('Criteria'), null)
in SF_ROOT_DIR/lib/model/om/BaseZorMicrosoftContentPeer.php line 196 ...
at BaseZorMicrosoftContentPeer::doSelect(object('Criteria'))
in SF_ROOT_DIR/apps/cms/modules/zor/actions/actions.class.php line 27 ...
at zorActions->executeCourses()
in SF_SYMFONY_LIB_DIR/action/sfActions.class.php line 53 ...
at sfActions->execute()
in SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 129 ...




I have this as my top level config/database.yml:

all:
propel:
class: sfPropelDatabase
param:
hostspec: localhost
database: zor
username: autos
password: zzz




I've checked these credentials. I can log into this database from the command line, using these credentials.

I've run "symfony cc". I've rebuilt the model classes.

What am I missing?





This question has been answered.

marshall | 04/06/10 at 11:55am Edit


(4) Responses

See a threaded view of answers?

Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

  • avatar
    Last edited:
    04/06/10
    1:00pm
    Arturo Linares says:

    try adding the dsn key, like (in this case I'm using postgres –the pgsql part–):


    all:
    propel:
    class: sfPropelDatabase
    param:
    dsn: pgsql://autos:zzz@localhost/zor
    encoding: utf8 # Default charset for table creation
    persistent: false # Use persistent connections

  • avatar
    Last edited:
    04/06/10
    12:05pm
    Martin Palacio says:

    Did you mean "databases.yml" right? (note the last 's' on file name)

    I was always comfortable with the DSN syntax instead of separated params.

    Look here, at listing 8-18.

    Also check file permissions, location, and syntax (ex. extra spaces).

  • avatar
    Last edited:
    04/06/10
    12:11pm
    casivaagustin says:

    You miss the DSN, if you use MySQL try with this command<br />

    php symfony configure:database "mysql:host=localhost;dbname=zor" autos zzz

  • avatar
    Last edited:
    04/06/10
    12:28pm
    Gert Findel says:

    databases.yml


    all:
    propel:
    class: sfPropelDatabase
    param:
    dsn: 'mysql:host=localhost;dbname=zor'
    username: autos
    password: zzz

This question has expired.





Current status of this question: Completed



Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.

If the asker does not get an answer then they have 10 days to request a refund.