I am trying to connect to a database in SQL Server 2008 from Yii2. My version of php is 5.6.31
This is my configuration file in db.php
return [
'class' => 'yii\db\Connection',
'dsn' => 'mssql:host=127.0.0.1;dbname=softwareoperacional',
'username' => 'sa',
'password' => 'admin123',
'charset' => 'utf8',
];
I receive the following error message:
exception 'PDOException' with message 'could not find driver' in C: \ xampp \ htdocs \ basic \ vendor \ yiisoft \ yii2 \ db \ Connection.php: 646
Additional information
- Yii vesion 2.0.12
- PHP version 5.6.31
- Operating system Windows 7 sp1