Estoy intentando conectar Yii con SQLSERVER y me sale este error.
Esto es lo que tengo en el COMMON/Config/main.php
Código (log) [Seleccionar]
CDbException
CDbConnection failed to open the DB connection.
Esto es lo que tengo en el COMMON/Config/main.php
Código (php) [Seleccionar]
<?php
return array(
'preload' => array('log', 'bootstrap'),
'aliases' => array(
'frontend' => dirname(__FILE__) . '/../..' . '/frontend',
'common' => dirname(__FILE__) . '/../..' . '/common',
'backend' => dirname(__FILE__) . '/../..' . '/backend',
'vendor' => dirname(__FILE__) . '/../..' . '/common/lib/vendor',
'bootstrap' => dirname(__FILE__) . '/../..' . '/common/lib/vendor/clevertech/yii-booster/src',
'auth' => dirname(__FILE__) . '/../..' . '/backend/modules/auth'
),
'import' => array(
'common.extensions.components.*',
'common.components.*',
'common.helpers.*',
'common.models.*',
'application.controllers.*',
'application.extensions.*',
'application.helpers.*',
'application.models.*',
'common.gii.*'
),
'language' => 'es',
//'behaviors' => array('LanguageBehavior'),
'components' => array(
'db' => array(
//'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
//'connectionString' => 'mysql:host=192.168.0.117;dbname=yiiBase',
'connectionString' => 'sqlsrv:server=SOPORTE03\SQLEXPRESS;database=seguimiento',
//'emulatePrepare' => true,
'username' => 'sa',
'password' => 'jean1234',
//'charset' => 'utf8',
'tablePrefix' => 'dbo.',
),
'errorHandler' => array(
'errorAction' => 'site/error',
),
'bootstrap' => array(
'class' => 'common.lib.vendor.clevertech.yii-booster.src.components.Bootstrap',
),
'log' => array(
'class' => 'CLogRouter',
'routes' => array(
array(
'class' => 'CDbLogRoute',
'connectionID' => 'db',
'levels' => 'error, warning',
),
),
),
),
'params' => array(
// php configuration
'php.defaultCharset' => 'utf-8',
'php.timezone' => 'UTC',
)
);