Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Have you installed the unixODBC module? <b>sudo apt-get install unixodbc</b></p> <p>Have you installed ODBC support for PHP? <b>sudo apt-get install php5-odbc</b></p> <p>Have you defined the connection to the Microsoft Sequel Server in your odbc.ini and odbcinst.ini files?</p> <pre><code>odbc.ini # Define a connection to the MSSQL server. # The Description can be whatever we want it to be. # The Driver value must match what we have defined in /etc/odbcinst.ini # The Database name must be the name of the database this connection will connect to. # The ServerName is the name we defined in /etc/freetds/freetds.conf # The TDS_Version should match what we defined in /etc/freetds/freetds.conf [msft_sql_server] Description = The Microsoft Sequel Server Driver = freetds Database = XXXXXXXXXX ServerName = msft_sql_server TDS_Version = 8.0 odbcinst.ini # Define where to find the driver for the Free TDS connections. [freetds] Description = MS SQL database access with Free TDS Driver = /usr/lib/i386-linux-gnu/odbc/libtdsodbc.so Setup = /usr/lib/i386-linux-gnu/odbc/libtdsS.so UsageCount = 1 </code></pre> <p>And then your PHP connection will look something like this:</p> <pre><code>$db_connection = new PDO("dblib:dbname=$database_server;host=$database_server", $db_username, $db_password); </code></pre> <p>You can test the above set up using the iSQL program just to make sure you can establish a connection.</p> <p>If you're still having trouble connecting from your Linux server to the MSFT server - is there a firewall in the way? Are you sure you have valid user credentials? Will the MSFT server accept connections from a remote client?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload