Marcin Gil has an excellent guide about how to setup ODBC drivers on Linux to talk to a Microsoft MSSQl Server running on Windows. This uses the FreeTDS drivers & unixODBC, along with standard PHP/Apache setup.
After following these instructions, I found my database was still giving me the following error:
Warning: odbc_connect() [function.odbc-connect]: SQL error: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source, SQL state S1000 in SQLConnect in /var/www/testdatabase/stdFunctions.php on line 49
This was due to my database code not passing the correct username and password. I had to edit the odbc_connect() line to read as follows:
odbc_connect(»database», «DOMAIN\username», «password»);
This entry was written by David and posted on Monday, February 01, 2010 and filed under database , linux , security , sql , windows Bookmark the permalink . Follow any comments here with the RSS feed for this post . Post a comment ( in a new window )
