sudo service apache2 restart
tsql -H your.server.name -p 1433 -U yourusername -P yourpassword -D yourdatabasename
If it connects, it’s working. Note: If you try to SELECT an NTEXT or NVARCHAR column you may get an error saying “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”. That is expected and will be fixed in the next step.
sudo vim /etc/freetds/freetds.conf
Add this at the end of the file:
Test FreeTDS using server name
tsql -S yourserver -U yourusername -P yourpassword -D yourdatabasename
If you try to select something, you shouldn’t get the Unicode error now – because you specified “tds version = 8.0″.
Test in PHP
That should do it