#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    9
    Rep Power
    0

    Unhappy Remote connect to mssql via php on IIS6


    Long time listner... first time caller... with that said...

    Ive been racking my brain here for the passed couple of days, Im trying to connect to a remote msSQL 200 Server using PHP running on a Windows 2k3 box.

    first i tried the standard php mssql functions:

    $dbuser = "XXXXXX";
    $dbpass = "XXXXXX";
    $dbname = "XXXXXX";
    $dsn = "XXXXXX";
    $database = "XXX.XX.XX.XXX";

    $conn = mssql_connect ( $dsn,$dbuser,$dbpass ) ;

    but no luck, the SQL host told me he didnt even see my servers IP hitting the SQL box... so this proved to be an invalid method (i think, totally in the dark here guys...)

    Next i tried ODBC:
    $dbuser = "XXXXXX";
    $dbpass = "XXXXXX";
    $dbname = "XXXXXX";
    $dsn = "XXXXXX";
    $database = "XXX.XX.XX.XXX";

    $conn = @odbc_pconnect( $dsn, $dbuser, $dbpass );

    I was succesfull with ODBC however odbc truncates information over 8k, and im submitting at some points well over that amount.


    Next i tried ADOdb but i dont see how to connect to a remote using adodb functions/connection methods.


    so here is where im left... i am hoping someone could help me out in figuring out how i can connect to a ms SQL database that is remotely hosted, and that will allow me to INSERT over 8kb of data in a single query.

    thanks
  2. #2
  3. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    538
    Do you have SQLServer client tools intalled on the local (php) machine?
    Did you check http://it.php.net/manual/en/function.mssql-connect.php ?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    9
    Rep Power
    0
    I dont have SQL or the client tools installed on that machine. Should i install it there? What configuration woudl i need to set for the client tools, im a bit unclear on why simply installing the SQL client tools would make that big of a difference in php's connectivity to a remote server.

IMN logo majestic logo threadwatch logo seochat tools logo