2017-09-26 7 views
0

Laravel 5.4 프로젝트에서 SQL Server를 사용하고 있는데 Laravel\Socialite을 사용하면 처리기에서 오류가 발생합니다. 구글/StackOverflow의에Laravel/MSSQL (AWS RDS) 일반 오류 : 20018 유니 코드 데이터

SQLSTATE[HY000]: General error: 20018 Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. [20018] (severity 16) [(null)] (SQL: select top 1 * from [social_logins] where [social_id] = 109095424026454018110 and [provider] = google) 

일부 답변은 내가 8.0client charsettds version를 변경해야하지만 난이 RDS 아마존 웹 서비스에서 내 데이터베이스가 있고 (저 멍청한 놈)을 변경할 수 있다고 말한다.

답변

0

문제는 Laravel 방식으로 select *를 사용하고있었습니다.

$userRes = User::where('email', '=', $user->email)->first(); 

그래서 나는 그 모든 것이 잘 작동이

$userRes = User::select('id','email')->where('email', '=', $user->email)->first(); 

처럼 ('컬럼 1', '컬럼 1')를 선택했다.