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

    Join Date
    Nov 2003
    Posts
    694
    Rep Power
    95

    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?
    Evan
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,350
    Rep Power
    594
    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
    Posts
    8,317
    Rep Power
    7170
    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.
    PHP FAQ

    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
    Posts
    14,424
    Rep Power
    4539
    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
    ======
    The man who doesn't read good books has no advantage over the man who can't read them.
    --Mark Twain

IMN logo majestic logo threadwatch logo seochat tools logo