I'm trying to connect with MSSQL Server but I'm having some difficulties. First, my server is throwing the following error:
Message: SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)
Well, I think I installed FreeTDS successfully, because every check I made shows me that everything is okay.
MSSQL configs:

PDO config:

My attempt to connect:
[local : production]
resources.db.adapter = "pdo_mssql"
resources.db.params.pdoType = "dblib"
resources.db.params.charset = "utf8"
resources.db.isDefaultTableAdapter = true
resources.db.params.driver_options.ReutlocarnDatesAsStrings = true
resources.db.params.dbname = "database"
resources.db.params.host = "server-ip"
resources.db.params.username = "user"
resources.db.params.password = "password"
The modules they're installed
rodrigo@thx1138 ~ [15:51:16]
$ php -m | grep "mssql"
mssql
rodrigo@thx1138 ~ [15:51:28]
$ php -m | grep "pdo_"
pdo_dblib
pdo_mysql
My freetds.config: http://pastebin.com/qA0XwFVD
My nmap output
Starting Nmap 6.40 ( http://nmap.org ) at 2014-07-02 17:48 BRT
Nmap scan report for host (IP)
Host is up (0.00049s latency).
Not shown: 919 filtered ports, 74 closed ports
PORT STATE SERVICE
21/tcp open ftp
25/tcp open smtp
80/tcp open http
139/tcp open netbios-ssn
1433/tcp open ms-sql-s
3128/tcp open squid-http
3389/tcp open ms-wbt-server
This is my freetds settings
tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 5.0
iODBC: no
unixodbc: no
SSPI "trusted" logins: no
Kerberos: no
And when I try to connect through FreeTDS got the error:
rodrigo@thx1138 ~
> $ tsql -S server-ip -U user
Password:
locale is "LC_CTYPE=en_US.UTF-8;LC_NUMERIC=pt_BR.UTF-8;LC_TIME=pt_BR.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=pt_BR.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=pt_BR.UTF-8;LC_NAME=pt_BR.UTF-8;LC_ADDRESS=pt_BR.UTF-8;LC_TELEPHONE=pt_BR.UTF-8;LC_MEASUREMENT=pt_BR.UTF-8;LC_IDENTIFICATION=pt_BR.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20009 (severity 9):
Unable to connect: Adaptive Server is unavailable or does not exist
OS error 111, "Connection refused"
There was a problem connecting to the server
Actually some months ago I've already made a successful installation, but to be honest don't know what I've done and unfortunately I've had to format my machine, so my problem is that I can't do it again. I think my problem is between my dblib and FreeTDS but can't find what I'm doing wrong. Thanks in advance for any help.
Ubuntu: 14.04 PHP Version 5.5.9-1ubuntu4.2