Hi, I am trying to follow the tutorial on the yii-blog-1.0.3.pdf. I have a windows XP, with the latest xampp installed. I’ve followed TO THE LETTER the tutorial, but when I get to the part of Scaffolding (2.2) I get the following error:
C:\>/xampp/htdocs/yii/framework/yiic shell /xampp/htdocs/blog/index.php
Yii Interactive Tool v1.0
Please type ‘help’ for help. Type ‘exit’ to quit.
>> model User
exception ‘CDbException’ with message ‘CDbConnection failed to open the DB connection: could not find driver’ in C:\xampp\htdocs\yii\framework\db\CDbConnection.php:233
Stack trace:
#0 C:\xampp\htdocs\yii\framework\db\CDbConnection.php(208): CDbConnection->open()
#1 C:\xampp\htdocs\yii\framework\db\CDbConnection.php(187): CDbConnection->setActive(true)
#2 C:\xampp\htdocs\yii\framework\base\CApplication.php(733): CDbConnection->init()
#3 C:\xampp\htdocs\yii\framework\base\CApplication.php(385): CApplication->getComponent(‘db’)
#4 C:\xampp\htdocs\yii\framework\cli\commands\shell\ModelCommand.php(92): CApplication->getDb()
#5 C:\xampp\htdocs\yii\framework\console\CConsoleCommand.php(116):ModelCommand>generateModel(‘C:\xampp\htdocs…’, Array)
#6 C:\xampp\htdocs\yii\framework\cli\commands\shell\ModelCommand.php(72): CConsoleCommand->copyFiles(Array, ‘C:\xampp\htdocs…’, Array)
#7 C:\xampp\htdocs\yii\framework\cli\commands\ShellCommand.php(99): ModelCommand->run(Array)
#8 C:\xampp\htdocs\yii\framework\cli\commands\ShellCommand.php(79): ShellCommand->runShell(Array)
#9 C:\xampp\htdocs\yii\framework\console\CConsoleCommandRunner.php(62): ShellCommand->run()
#10 C:\xampp\htdocs\yii\framework\console\CConsoleApplication.php(88): CConsoleCommandRunner->run(Array)
#11 C:\xampp\htdocs\yii\framework\base\CApplication.php(170): CConsoleApplication->processRequest(Array)
#12 C:\xampp\htdocs\yii\framework\yiic.php(30): CApplication->run()
#13 C:\xampp\htdocs\yii\framework\yiic(15): require_once(‘C:\xampp\htdocs…’)
#14 {main}
>>
Previously, as the tutorial states, I modified the …blog/protected/config/main.php to look as:
‘db’=>array(
'class'=>'CDbConnection',
'connectionString'=>'sqlite:/xampp/htdocs/blog/protected/data/blog.db',
),
I already have the sqlite file copied from the the framework demo directory.
Any ideas?