Hi all... thanks in advance for the help...
I've installed the latest version of Yii and created my first webapp per the tutorial.
I added the 'db' section to my main.php as follows:
// Database
'db' => array(
'class' => 'CDbConnection',
'emulatePrepare' => true,
'autoConnect' => true,
'persistent' => true,
'connectionString' => 'mysql:host=localhost;dbname=xxx;',
'username' => 'xxuser',
'password' => 'xxuser',
),
However, when I run my site now, I'm getting an exception:
CException
Description
Property "CWebApplication.db" is read only.
Source File
/usr/local/yii/framework/base/CApplication.php(783)
==================
1. Why?
2. Nobody else seems to be getting this?
3. What did I do wrong?
If I remove the 'db' section from main.php, the exception goes away.
Help is appreciated.
Page 1 of 1
Error during tutorial/setup (CWebApplication.db is read only error)
#2
Posted 15 March 2009 - 01:38 PM
Nevermind, I'm retarded.
'db' section needs to be under 'components' array. I had it at the top.
Thanks!
'db' section needs to be under 'components' array. I had it at the top.
Thanks!
Share this topic:
Page 1 of 1

Help














