Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An invalid encoding was specified for SQLSRV_ATTR_ENCODING #29

Open
liuzhengjian opened this issue Apr 30, 2019 · 0 comments
Open

An invalid encoding was specified for SQLSRV_ATTR_ENCODING #29

liuzhengjian opened this issue Apr 30, 2019 · 0 comments

Comments

@liuzhengjian
Copy link

think-migration version: 1.*
thinkphp version: 5.0.13

使用sqlsrv报错 SQL Server fails with SQLSTATE[IMSSP]: An invalid encoding was specified for SQLSRV_ATTR_ENCODING.

官方解决方法应该去除charset设置,应该在Command.php的getDbConfig方法返回数据之前增加
if($config['type'] == 'sqlsrv'){ unset($dbConfig['charset']); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant