I recently installed Yii to perform a project for my final internship in IT. Everything happened fine until now.
I configured well the index.php in my project file, nothing crazy :
defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);
defined(‘YII_TRACE_LEVEL’) or define(‘YII_TRACE_LEVEL’,3);
As you saw, the mail.php file is in the protected/config path. I enabled gii in the module :
'class'=>'system.gii.GiiModule', 'password'=>'XXXXXXXXX', // If removed, Gii defaults to localhost only. Edit carefully to taste. 'ipFilters'=>array('XX.XX.XXX.XX'),
And my db :
'class'=>'CDbConnection', 'connectionString'=>'sqlsrv:Server=XX.XX.XXX.XXXX;Database=XXXXXX_XXX', 'username'=>'XXXXXXXXX', 'password'=>'XXXXXXXXX', 'charset' => 'utf8', 'emulatePrepare' => false,
MY db is in Tranact-SQL, so with my research, I found that I need ‘sqlsrv’. This is the first thing I’m not sure (I use SQL management studio).
So I succeded to connect to the Gii screen, but when I get click on the ‘Model generator’, I got this error :
[indent]‘CDbConnection failed to open the DB connection: could not find driver’. [/indent]
I know that a lot of people had the same, but I spent the whole day going thought their topic, and no one made me succeed.I tried quite all the db kind of connection, I think there is some other problem behind this.
One more information, everything is installed on the server and not in local.
If you have an idea ??
Thanks a lot.