Looking for help in php + sql server 2005

Discussion in 'PHP' started by phpsolution, May 18, 2010.

  1. #1
    Hello Friends,
    I am developing one application in php and its Database is SQL 2005 and same time it working perfectly at localhost and having no problem but when i upload to windows server and try to connect with SQL SERVER THEN send me this error


    Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 64.50.162.71 in c:\domains\rockersinfo.com\wwwroot\update\driver\includes\functions\database.php on line 5
    PHP:
    CLICKE HERE TO CHECK OUT AT MY SERVER

    PLEASE HELP ME OUT....THANKS ALL OF YOU
     
    phpsolution, May 18, 2010 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    check the server for remote accessing.. or if the script is uploaded with the same server where the db is, just use localhost
     
    bartolay13, May 18, 2010 IP
  3. phpsolution

    phpsolution Active Member

    Messages:
    449
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    90
    #3
    Script is uploaded on same server and i used localhost now its having same error
     
    phpsolution, May 18, 2010 IP
  4. maestria

    maestria Well-Known Member

    Messages:
    705
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #4
    there is a chance that mssql_connect function is not enabled in php.
    Put a phpinfo page and check if mysql is allowed in php.
     
    maestria, May 18, 2010 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    Check your php.ini and uncomment the mssql lines. If you're on windows you should be able to connect once you do this.
     
    jestep, May 18, 2010 IP
  6. phpsolution

    phpsolution Active Member

    Messages:
    449
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    90
    #6
    I want to check LIVE ON MY WINDOWS SERVER .
     
    phpsolution, May 18, 2010 IP
  7. bizzar

    bizzar Active Member

    Messages:
    108
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #7
    If not using "localhost" as your servername/address, then you will have to enable remote sql connections.

    How to configure SQL Server 2005 to allow remote connections
    http://support.microsoft.com/kb/914277
     
    bizzar, May 18, 2010 IP