how to connect mssql with php

  • nafeeza

    Valued Member

    Points: 63

    Hii friends

    i am getting an error

    Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. (severity 14) in D:\wamp\www\overnightmiami\class\db_class.php on line 38

    Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 192.168.1.15,1433 in D:\wamp\www\overnightmiami\class\db_class.php on line 38

    when i connected php with mssql database which is in other system with iis server and php is in my system with wamp server .....plz any one give me solution i will be thankful to you

    the main aim is to connect php with mssql database

    is it possible ?

  • Florian Reischl

    SSC-Dedicated

    Points: 37299

    Hi

    It seems to be a authentication problem. I'm not sure if PHP supports impersonation. I think your appache service account needs rights on your SQL Server or use SQL Server authentication.

    Greets

    Flo

  • ocheret.oc

    SSC Rookie

    Points: 31

    As I know from php tutorials you can try

    <?php

    // Server in the this format: <computer>\<instance name> or

    // <server>,<port> when using a non default port number

    $server = 'KALLESPC\SQLEXPRESS';

    // Connect to MSSQL

    $link = mssql_connect($server, 'sa', 'phpfi');

    if (!$link) {

    die('Something went wrong while connecting to MSSQL');

    }

    ?>

  • nabazar79

    Grasshopper

    Points: 17

    Hi dears
    During installation a prepared website code, I need your guidance to resolve my problem with this error: 

    SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply