title: Problems with unixODBC and FreeTDS config
body: <p>I have been working on this for way too long and can't seem to figure it out. I am sure I have something wrong in my freetds.conf, odbc.ini or odbcinst.ini. I can connect to my mssql 2008 server using tsql, but still can't with isql or of course through php.</p>
  
  <p>I am on CentOS 5.6.</p>
  
  <p>Can anyone offer some assistance?</p>
  
  <p>Thanks!
  Shawn</p>
  
  <p>This is in my sqltrace.log:</p>
  
  <pre><code> [ODBC][12249][1347850711.939084][__handles.c][459]
      Exit:[SQL_SUCCESS]
      Environment = 0x1b5fc6c0
      [ODBC][12249][1347850711.939149][SQLAllocHandle.c][375]
      Entry:
          Handle Type = 2
              Input Handle = 0x1b5fc6c0
  [ODBC][12249][1347850711.939187][SQLAllocHandle.c][493]
          Exit:[SQL_SUCCESS]
              Output Handle = 0x1b5fcff0
  [ODBC][12249][1347850711.939231][SQLConnect.c][3654]
          Entry:
              Connection = 0x1b5fcff0
              Server Name = [MSSQL_DSN][length = 9 (SQL_NTS)]
              User Name = [InetIndyArtsRemote][length = 18 (SQL_NTS)]
              Authentication = [**********][length = 10 (SQL_NTS)]
          UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
  
          DIAG [01000] [FreeTDS][SQL Server]Unexpected EOF from the server
  
          DIAG [01000] [FreeTDS][SQL Server]Adaptive Server connection failed
  
          DIAG [S1000] [FreeTDS][SQL Server]Unable to connect to data source
  
  [ODBC][12249][1347850711.949640][SQLConnect.c][4021]
          Exit:[SQL_ERROR]
  [ODBC][12249][1347850711.949694][SQLFreeHandle.c][286]
          Entry:
              Handle Type = 2
              Input Handle = 0x1b5fcff0
  [ODBC][12249][1347850711.949735][SQLFreeHandle.c][337]
          Exit:[SQL_SUCCESS]
  [ODBC][12249][1347850711.949773][SQLFreeHandle.c][219]
          Entry:
              Handle Type = 1
              Input Handle = 0x1b5fc6c0
  </code></pre>
  
  <p>freetds.conf:</p>
  
  <pre><code>    #   $Id: freetds.conf,v 1.12 2007/12/25 06:02:36 jklowden Exp $
      #
      # This file is installed by FreeTDS if no file by the same
      # name is found in the installation directory.
      #
      # For information about the layout of this file and its settings,
      # see the freetds.conf manpage "man freetds.conf".
  
      # Global settings are overridden by those in a database
      # server specific section
      [global]
              # TDS protocol version
              tds version = 8.0
  
              # Whether to write a TDSDUMP file for diagnostic purposes
              # (setting this to /tmp is insecure on a multi-user system)
              dump file = /tmp/freetds.log
              debug flags = 0xffff
              dump file append = yes
  
              # Command and connection timeouts
      ;       timeout = 10
      ;       connect timeout = 10
  
              # If you get out-of-memory errors, it may mean that your client
              # is trying to allocate a huge buffer for a TEXT field.
              # Try setting 'text size' to a more reasonable limit
              text size = 64512
  
  [IndyArtsDB]
          host = xxx.xx.xxx.xx
          port = 1433
          tds version = 8.0
          client charset = UTF-8
  </code></pre>
  
  <p>ODBC.INI</p>
  
  <pre><code>[MSSQL_DSN]
  Driver=FreeTDS
  Description=IndyArts DB on Rackspace
  Trace=No
  Server=xxx.xx.xxx.xx
  Port=1433
  Database=DBName
  </code></pre>
  
  <p>ODCBINST.INI</p>
  
  <pre><code>[ODBC]
  DEBUG=1
  TraceFile=/home/ftp/sqltrace.log
  Trace=Yes
  
  [FreeTDS]
  Description=MSSQL Driver
  Driver=/usr/local/lib/libtdsodbc.so
  UsageCount=1
  </code></pre>