I'm desperately trying to figure out how to connect PHP to MSSQL. I have PHP running on one server (SUSE Linux) and MSSQL running on another Windows server. I'm trying to figure out the best way to get them to connect.
I've also configured PHP so that it is setup with unixODBC.
Here is my odbc.ini file:
Driver = SQL Server Native Client 11.0
Database = <removed db name>
Server = <removed db server>
Port = <removed db port>
Here is my odbcinst.ini file:
[SQL Server Native Client 11.0]
Description=Microsoft SQL Server ODBC Driver V1.0 for Linux
Then in my php connection file I have the following:
When I run the above PHP I get the following error:
Error: SQLSTATE[IM004] SQLConnect: 0 [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
Does, anyone have any idea what I'm doing wrong? I've been reading everything I can on the subject and I've been messing with this for over 2 weeks now trying to get it to work. I'm at my wits end! Please help! anyone!!