1. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Rep Power

    Adding mssql_connect

    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?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Rep Power
    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.
  4. #3
  5. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Rep Power
    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

    • gw1500se agrees : Sorry, I should have said extensions rather than library.

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Rep Power
    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.
    Doug G
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton

IMN logo majestic logo threadwatch logo seochat tools logo