I’m trying to use this extension, I’ve defined the behaviours function and the translate one as described in the manual, but when I do ./yiic translate an exception is raised when a new instance of the founded ‘translatable’ class is created, i.e. at row 97 when this code is called $model = new $class_name;
this is the exception raised:
exception ‘CDbException’ with message ‘CDbConnection failed to open the DB connection: could not find driver’ in /var/www/aff/framework/db/CDbConnection.php:382
Stack trace:
#0 /var/www/aff/framework/db/CDbConnection.php(331): CDbConnection->open()
#1 /var/www/aff/framework/db/CDbConnection.php(309): CDbConnection->setActive(true)
#2 /var/www/aff/framework/base/CModule.php(388): CDbConnection->init()
#3 /var/www/aff/framework/base/CApplication.php(431): CModule->getComponent(‘db’)
#4 /var/www/aff/framework/db/ar/CActiveRecord.php(615): CApplication->getDb()
#5 /var/www/aff/framework/db/ar/CActiveRecord.php(2263): CActiveRecord->getDbConnection()
#6 /var/www/aff/framework/db/ar/CActiveRecord.php(379): CActiveRecordMetaData->__construct(Object(Accessory))
#7 /var/www/aff/framework/db/ar/CActiveRecord.php(394): CActiveRecord::model(‘Accessory’)
#8 /var/www/aff/framework/db/ar/CActiveRecord.php(78): CActiveRecord->getMetaData()
#9 /var/www/aff/application/protected/commands/TranslateCommand.php(97): CActiveRecord->__construct()
#10 /var/www/aff/application/protected/commands/TranslateCommand.php(35): TranslateCommand->_loadModelFile(’/var/www/aff/…’)
#11 /var/www/aff/framework/console/CConsoleCommandRunner.php(65): TranslateCommand->run(Array)
#12 /var/www/aff/framework/console/CConsoleApplication.php(91): CConsoleCommandRunner->run(Array)
#13 /var/www/aff/framework/base/CApplication.php(162): CConsoleApplication->processRequest()
#14 /var/www/aff/framework/yiic.php(33): CApplication->run()
#15 /var/www/aff/application/protected/yiic.php(7): require_once(’/var/www/aff/…’)
#16 /var/www/aff/application/protected/yiic(4): require_once(’/var/www/aff/…’)
Normal application database connecting works.