October 9th, 2012, 01:15 PM
I need to connect to a remote MS SQL server and I think I need to have mssql_connect added to the php installation. I am using freebsd. How can I add mssql_connect?
October 9th, 2012, 01:36 PM
First, don't use the depreciated MySQL library. Use PDO instead.
Second, PDO may already be installed including the MySQL driver. Use phpinfo to see what the current configuration is.
There are 10 kinds of people in the world. Those that understand binary and those that don't.
October 9th, 2012, 10:58 PM
The MySQL library is deprecated, but the MSSQL library isn't. The MSSQL driver for PDO is experimental so that probably shouldn't be used.
The PHP manual seems to indicate that you need to compile and install the FreeTDS library with the --enable-msdblib flag and then recompile PHP with the --with-mssql option.
Comments on this post
October 9th, 2012, 11:51 PM
With Fedora 16 you can install freetds and php-mssql via yum and you don't need to recompile anything then.
I always make sure I can connect to the target mssql server from the php server using the command-line tsql program before layering php and a web server on top of things.
Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.