我正在使用Cakephp 3和MSSQLSRV 2014.我做了所有必要的更改以连接到MSSQL服务器。在GUI中,我可以看到cakephp可以连接到MSSQL。请参阅下面的屏幕截图。
所以现在当我进入bin目录来烘焙应用程序时,我得到以下错误无法加载已安装的MSSQL驱动程序:
以下是app.php文件中的数据源设置:
'Datasources' => [
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Sqlserver',
'persistent' => false,
'host' => 'localhost\SQLEXPRESS',
/**
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
'port' => '1433',
'username' => 'sa',
'password' => 'password',
'database' => 'ServerMatrix',
'encoding' => 65001,
'timezone' => 'UTC',
'cacheMetadata' => true,
'log' => false,
我在想它可能是一个应该向CakePHP社区报告的bug,但是想从堆栈溢出社区获得一些帮助,看看他们是否遇到过这样的问题。