2015-07-06 2 views
0

Приложение laravel 4 извлекает данные с сервера MSSQL 2012. Он работает отлично на Windows, но развернут на CentOS я получил следующее сообщение об ошибке:Laravel 4 + CentOS + MSSQL 2012 = ошибка

Next exception 'Illuminate\Database\QueryException' with message 'SQLSTATE[HY000]: General error: 4004 General SQL Server error: Check messages from the SQL Server [4004] (severity 16) [(null)]

Проверен в отображениях ошибок MSSQL и точной ошибке:

Unicode data in a Unicode-only collation or ntext data can not be sent to clients using DB-Library (z. B. isql) or ODBC version 3.7 or earlier use.

После прибегая к помощи единственному, что я нашел, было слишком низкая версия freetds, и я изменил ее с 4.2 до 7.0 в etc/freetds.conf - ничего не меняется. Пожалуйста, сообщите, что может быть проблемой здесь.

ответ

0

Сделал быстрый поиск и нашел еще пару вещей, которые вы можете сделать:

In /etc/freetds/freetds.conf add these two lines (last two): 
[global] 
;tds version = 4.2 
tds version = 8.0 
client charset = UTF-8 

You can edit "charset" in php.ini too (but you don't need if you did it previously in freetds.conf): 
;Specify client character set.. 
;If empty or not set the client charset from freetds.comf is used 
;This is only used when compiled with FreeTDS 
mssql.charset = "UTF-8" 

Надеется, что это работает.

0

Так же, как вы процитировали:

Unicode data in a Unicode-only collation or ntext data can not be sent to clients using DB-Library (z. B. isql) or ODBC version 3.7 or earlier use.

Так что вам необходимо обновить ODBC драйвера неfreetds, в вашем случае вы можете захотеть взглянуть на модернизацию unix-odbc.

Смежные вопросы