开发者

How to update database connection details in symfony (maybe propel?)

I don't develop with symphony but need to update the database connection details for a couple websites developed by third parties running it.

They appear to make use of propel.

I've updated the dsn in database.yml but this has just taken the site offline (500 error)

Any idea what I might have done wrong or may need to do to force the changes through. Is there some kind of update script I n开发者_如何学Goeed to run?

In case it helps I seem to have propel-init-crud, propel-generate-crud as options for propel when I run:

> php symfony propel


Whenever changes are made to symfony files, especially .yml files, you always need to run the clear cache command to remove all the cache files.

php symfony -cc


Look in config/propel.ini:

propel.database.url        = mysql:dbname=foo;host=localhost
propel.database.user       = foo
propel.database.password   = foo

The same details need to be in databases.yml

Also it would be easier to answer if you said exactly what the error is.


i need to know what is symfony version that you running , to knowing your symfony version , run this command in terminal(unix)/command prompt(win) in project directory

$ ./symfony -V

if you using symfony 1.4 the best way to set database configuration is :

$ ./symfony configure:database --name=propel --class=sfPropelDatabase "mysql:host=localhost;dbname=dbname" user secret

good luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜