Hi,
i am new into Yii so this error might to be fixed easy.
After opening the app in the shell i tried to create a model with "model User". Of course i have a table named User in my database… The error seems to occur befor:
Yii Interactive Tool v1.1 (based on Yii v1.1.3)
Please type 'help' for help. Type 'exit' to quit.
>> model User
exception 'CDbException' with message 'CDbConnection failed to open the DB connection: invalid data source name' in /framework/db/CDbConnection.php:269
Stack trace:
#0 /framework/db/CDbConnection.php(242): CDbConnection->open()
#1 /framework/db/CDbConnection.php(221): CDbConnection->setActive(true)
#2 /framework/base/CModule.php(363): CDbConnection->init()
#3 /framework/base/CApplication.php(391): CModule->getComponent('db')
#4 /framework/cli/commands/shell/ModelCommand.php(260): CApplication->getDb()
#5 /framework/cli/commands/ShellCommand.php(144): ModelCommand->run(Array)
#6 /framework/cli/commands/ShellCommand.php(99): ShellCommand->runShell()
#7 /framework/console/CConsoleCommandRunner.php(62): ShellCommand->run(Array)
#8 /framework/console/CConsoleApplication.php(88): CConsoleCommandRunner->run(Array)
#9 /framework/base/CApplication.php(135): CConsoleApplication->processRequest()
#10 /framework/yiic.php(33): CApplication->run()
#11 /framework/yiic(15): require_once('/...')
My config looks like this:
'db'=>array(
'connectionString' => 'host=localhost;dbname=stako;port=8889',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
),
Thanks for your help in advance…
Flo