I have used unixodbc and FreeTDS for connecting to SQL Server from linux. Connection made successfully. Also when I run php code from command prompt it executes correctlly but when I try to run code in web browser it gives me error "Could not connect to Server".
I have searched It's problem of permissions. When I give all access permissions for odbc.ini, freetds.conf, odbcinst.ini then it is possible to access php pages in Web browser containing Sql server connection code.