mssql and php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • omerbutt
    Contributor
    • Nov 2006
    • 638

    mssql and php

    hi i am trying to connect to a mssql database i am getting the following errors
    [qoute]

    Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: EAST-BB98AF31A6\SQLE XPRESS in C:\xampp\htdocs \ews\projects\w hatever-tiff\sql-connect.php on line 5

    Notice: Connection failed: in C:\xampp\htdocs \ews\projects\w hatever-tiff\sql-connect.php on line 7
    [/quote]

    here is my code
    [code=php]
    <?php
    ini_set('displa y_errors', 1); // set to 0 for production version
    error_reporting (E_ALL);
    $server = 'EAST-BB98AF31A6\SQLE XPRESS';
    $link = mssql_connect($ server, 'EWS\omer', 'hondacd-70');
    if($link == false) {
    user_error("Con nection failed: " . mssql_get_last_ message());
    }
    ?>
    [/code]
    i have the module loaded i have attached the screen shot for the php info
    Attached Files
  • omerbutt
    Contributor
    • Nov 2006
    • 638

    #2
    done,
    never ever ,ever never never never ever use the built-in extension named mssql in xampp , go to microsoft download and search microsoft sql server drivers for php and extract the files , select the file name php_sqlsrv_ts_v c6.dll where vc6 is th matching version for the visual C you have and ts stands for threadsafe i had php 5.2.2.9 installed with xampp
    it worked like a charm , and yes do comment the mssql extension in the php.ini file before using the sqlsrv , do see the api list for the functions support to use instead of the mysql_<??> or mssql_<??>, anyone who has to do this same thing and cant understand do send me a pm
    reagards,
    omer aslam

    Comment

    Working...