SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2010
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MSSQL Connection

    Hi Folks,
    I am having trouble connecting to a remote SQL database.
    I know the credentials are correct but still I get an 'unknown error' when I try to connect using this script:

    PHP Code:
    <?php
    $hostname_con_iris 
    "10.0.0.51";
    $database_con_iris "DB1";
    $username_con_iris "myusername";
    $password_con_iris "mypassword";
    $con_iris mssql_connect($hostname_con_iris$username_con_iris$password_con_iris) or trigger_error(mysql_error(),E_USER_ERROR);
    ?>
    Does anyone have any idea what the problem could be?

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Does the SQL Server allow remote connections for the user in question?
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Zealot
    Join Date
    Sep 2010
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You asked the right question there logic_earth. I checked an the answer is no.
    I will get that sorted then the script should work.

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •