I use IIS bacause of many problems I had with apache and mssql express 2008
I use mssql.dll and sqlsrv.dll drivers
>> model cities
exception 'CDbException' with message 'CDbConnection failed to open the DB connection: could not find driver' in C:\Inetpub\wwwroot\yii-1.1.2\framework\db\CDbConnection.php:267
Have trouble enabling pdo_mssql.dll and probably it’s lack generates this error
>> model cities
exception 'CDbException' with message 'CDbConnection failed to open the DB connection: could not find driver' in C:\Inetpub\wwwroot\yii-1.1.2\framework\db\CDbConnection.php:267
line 267
protected function open()
{
if($this->_pdo===null)
{
if(empty($this->connectionString))
throw new CDbException(Yii::t('yii','CDbConnection.connectionString cannot be empty.'));
try
{
Yii::trace('Opening DB connection','system.db.CDbConnection');
$this->_pdo=$this->createPdoInstance();
$this->initConnection($this->_pdo);
$this->_active=true;
}
catch(PDOException $e)
{
// line 267 //
throw new CDbException(Yii::t('yii','CDbConnection failed to open the DB connection: {error}',
array('{error}'=>$e->getMessage())));
}
}
}