views:

1061

answers:

4

I need to connect to an MS SQL Server database from a PHP script running on a Linux server. I'm looking at using FreeTDS as there is no official MS SQL Server driver for Linux. Is this my best option? Is it ok in a production environment? Are there other options, perhaps ODBC?

+2  A: 

Is the best free option. I've used it with Qt (C++).

You can use it with unixODBC.

If you can pay it you could use the driver from easysoft

xgoan
Thanks, now if only I could get the connection working :)
Liam
+2  A: 

The company I work for has been running FreeTDS to connect to SQL 2000 on our production server for almost 6 years now. There's a couple of issues with special character encoding, but overall it works well.

Wally Lawless
Thanks, now if only I could get the connection working :)
Liam
+1  A: 

I couldn't agree more, FreeTDS does exactly what you want to do, here is a brief description of the product: "FreeTDS is a set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases."

Just visit their website and you will be off and running before you know it: http://www.freetds.org/

  • Nicholas
Nicholas Kreidberg
+1  A: 

I don't know about PHP, but it's definitely the best solution for Python. I've just written up a Beginners How To for it. The sections about Linux will be relevant to any programming language.

Singletoned