views:

29

answers:

1

I am running a LAMP server but now need to connect to MS SQL (client request). I have heard Microsoft has a driver, but can't verify if

Does anyone know if the Microsoft driver is available for Unix? If not, should I just stick with FreeTDS? This appears to be recommended by PHP, however install documentation seems lacking. Any direction on either would be greatly appreciated.

Sorry for the general question, I am not familiar with setting up PHP drivers.

UPDATE

Just for some back story, I am running an intranet from the LAMP server but needs to connect to a datasource on an external MS SQL DB Server (Windows of course). I am running PHP5.

A: 

FreeTDS is fine and works well enough. The Microsoft driver is Windows only, thus you wouldn't be able to use it on your Linux server.

First install FreeTDS and then configure PHP with --with-mssql=/prefix/used/for/freetds. If you are using your distribution's PHP, I'm sure there is a MS-SQL driver package already precompiled and available for installation (in Ubuntu, that'd be php5-sybase).

Then use PHP's mssql_* functions to actually do the work

pilif
Thanks. I think we are using debian. I'll give it a shot and mark this as answered if everything links up.
Jason McCreary
I ended up going with the precompiled php5-sybase package for Debian. Using apt-get it was much more straightforward than FreeTDS. Thanks.
Jason McCreary