Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
+ Reply to Thread
Results 1 to 4 of 4

This is a discussion on HELP! mssql_connect not connecting in the VPS & Dedicated forum
arrgh I am pulling my hair out over this, sifting thru reams of search results and I just can't make it work $myServer = "12.147.60.131,1433"; ...

  1. #1
    JPC Senior Member
    Join Date
    Jul 2004
    Posts
    70

    HELP! mssql_connect not connecting

    arrgh I am pulling my hair out over this, sifting thru reams of search results and I just can't make it work

    $myServer = "12.147.60.131,1433";
    $myUser = "XXX";
    $myPass = "XXX";

    //connection to the database
    $dbhandle = mssql_connect($myServer, $myUser, $myPass)
    or die("Couldn't connect to SQL Server on $myServer");

    I had support install mssql extension for php last night on my vps and I see the function is working, but it will not connect.

    Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 12.147.60.131,1433 in

    The host of the sql server says the version is sql 2000 and that he has no problem connecting with php. and the above is exactly how he does it. I am pretty much stumped, anyone had this problem? anyone have solutions?

    Thanks a lot!

  2. #2
    /dev/null JPC-Zishan's Avatar
    Join Date
    Apr 2008
    Posts
    257
    If the SQL server is up and accepting remote connections then the first thing I would suggest is making sure that the port 1433 is not being blocked on your server by firewall
    Zishan - L3 - Shift Lead | JaguarPC

    Helpful Links
    Knowledge Base | Network Status | Current Specials

  3. #3
    JPC Senior Member
    Join Date
    Jul 2004
    Posts
    70
    Thanks for the advice,

    When you say "on your server" do you mean my vps here at jag? because I am not sure that a fire wall on my computer would cause issues with this - and other people are connecting remotely to this mssql server so it does accept remote connections.

    Looking thru the manual at php.net: http://www.php.net/function.mssql-connect

    I see there are quite a few problems mentioned, but it is all very confusing to me, I was hoping that someone else had encountered this here in our Jag environment and could give me some advice.

    Thanks!

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    5,985
    Yes, you'll need to make sure that your VPS allows outbound connections to port 1433. You should also check that there are no restrictions in place that are preventing inbound connections on the MSSQL server. Even though you say others can connect to it remotely doesn't mean it is wide open to the world. Here at work we IP restrict most of our servers that don't have a direct public face to only allow people and/or other servers that have a need to use them access. Database servers are a prime example of this--DBAs and developers that work on those databases have access, as do the web and app servers that use them, but anyone else does not.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

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