1

I am trying to connect to a remote SQL Server Windows 2008R2 and a file server Windows 2008. I am wondering what the best way is to handle this. I've tried odbc_connect and mssql_connect without any luck.

When using odbc_connect I get these errors:

[unixODBC][Driver Manager]Data source name not found, and no default driver specified

[16-Jan-2014 16:02:12 UTC] PHP Warning:  odbc_connect() [<a href='function.odbc-
connect'>function.odbc-connect</a>]: SQL error: [unixODBC][Driver Manager]Data source
name not found, and no default driver specified, SQL state IM002 in SQLConnect in
/mnt/stor12-wc1-dfw1/657080/843636/www.ia764.org/web/content/cms/wp-content/themes
/iatse/functions/syntonics.php on line 27

This is not my area of expertise so layman's terms are welcomed.

Any help/guidance would be greatly appreciated!

tHeSiD
  • 4,587
  • 4
  • 29
  • 49

1 Answers1

0

I had this problem, too. What you need to do is install FreeTDS so you can use the ODBC drivers. It's somewhat of an intense process if you're not familiar with linux. However, I've documented all the steps in the answers here Connect PHP to MSSQL via PDO ODBC and here Can't Install FreeTDS via Yum Package Manager

This answer assumes you are on a linux server, not Windows.

Community
  • 1
  • 1
user1477388
  • 20,790
  • 32
  • 144
  • 264
  • Thanks! I am on a linux server. I'll give it a shot. – Sarah Wilkinson Jan 16 '14 at 16:50
  • Like I said, it's pretty intense (if you don't have server config experience), so good luck. You will need root level access to your server which means you would need a dedicated-virtual server (or your own server) to install FreeTDS. Don't forget to upvote and accept answers that helped you. – user1477388 Jan 16 '14 at 17:05