I'm resurrecting this because it was one of the early results on google for my problem...
First, install php-mssql
sudo apt-get update && sudo apt-get install php-mssql
Now edit freetds.conf sudo vi /etc/freetds/freetds.conf
Change the top few lines:
[global]
# TDS protocol version
; tds version = 8.0
; client charste = UTF-8
Finally you should create a locales.conf file within /etc/freetds to allow correct parsing of dates with SQL Server, i have this configuration and has worked well with DateTime, DateTime2, SmallDateTime and Date data types: sudo vi /etc/freetds/locales.conf
[default]
date format = %Y-%m-%d %I:%M:%S.%z
[en_US]
date format = %b %e %Y %I:%M:%S:%z%p
language = us_english
charset = iso_1
[es_ES]
date format = %b %d %Y %I:%M%p
language = spanish
charset = iso_1
[pt_BR]
date format = %d/%m/%Y %H:%M
language = Portuguese
charset = iso_1
[it_IT]
date format = %d/%m/%Y %H:%M
language = Italiano
charset = iso_1
Last, restart nginx sudo service nginx restart
Source: https://laracasts.com/discuss/channels/general-discussion/sqlsrv-driver-on-linux/replies/14887
Check this out:
carste <- mistake
[global]
# TDS protocol version
tds version = 8.0
client charset = UTF-8
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community