码迷,mamicode.com
首页 > 数据库 > 详细

laravel连sql server报invalid handle returned问题解决方案

时间:2017-09-25 13:09:08      阅读:451      评论:0      收藏:0      [点我收藏+]

标签:win   ons   div   http   sof   connect   pool   hub   laravel   

https://github.com/Microsoft/msphpsql/issues/116

4.1.1驱动下载地址

https://github.com/Microsoft/msphpsql/releases/tag/v4.1.1-Windows

还有一说是

在数据库配置中加入 ‘pooling’ => false

‘sqlsrv’ => [
‘driver’   => ‘sqlsrv’,
‘host’     => ‘xxx’,
‘database’ => ‘xxx’,
‘username’ => ‘xxx’,
‘password’ => ‘xxx’,
‘charset’  => ‘utf8’,
‘prefix’   => ”,
‘pooling’ => false

],

或者

注释掉port这一行

‘connections=> [
        ‘sqlsrv=> [
            ‘driver=> ‘sqlsrv‘,
            ‘host=> env( ‘DB_HOST‘ ),
            ‘port=> ‘, // THIS LINE
            ‘database=> env( ‘DB_DATABASE‘ ),
            ‘username=> env( ‘DB_USERNAME‘ ),
            ‘password=> env( ‘DB_PASSWORD‘ ),
            ‘prefix=> ‘,
            ‘charset=> ‘UTF-8‘,
            ‘pooling=> false,
        ],
],

laravel连sql server报invalid handle returned问题解决方案

标签:win   ons   div   http   sof   connect   pool   hub   laravel   

原文地址:http://www.cnblogs.com/yuanxiaoping_21cn_com/p/7591084.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!