The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MSSQL support ?

Discussion in 'Database Discussions' started by NemoXP, May 10, 2012.

  1. NemoXP

    NemoXP Active Member

    Joined:
    Feb 25, 2010
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Constanta, Romania, Romania
    cPanel Access Level:
    Root Administrator
    Hello.

    Is there any way to enable mssql extension for php (with cpanel)?

    W8ing for reply.
    thanks
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  3. arun123

    arun123 Registered

    Joined:
    Oct 10, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi Guyz

    I used the method mentioned in this post enable the mssql support. It gives all the necessary steps in enabling mssql support for php.
    /http://linuxwebservertips.in/mssql_support_php/
     
  4. chrismfz

    chrismfz Well-Known Member

    Joined:
    Jul 4, 2007
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Greece
    cPanel Access Level:
    DataCenter Provider
    unixODBC and FreeTDS installed properly.
    Mssql also seems enabled in phpinfo().

    Using tsql I can connect to a MSSQL server through the console.
    But using php I can't.

    An example:
    php:
    Code:
    if (function_exists('mssql_connect')){
            echo 'OK<br />';
    } else {
            echo 'NOT OK';
    
    }
    $connect = mssql_connect("xxx.xxx.xxx.xxx,1443", "user", "pass");
    var_dump($connect);
    $selected = mssql_select_db("db", $connect)
     or die("Couldn't open database");
    And I get:
    Code:
    OK
    bool(false) Couldn't open database
    So, mssql commands seems to exist, I can connect normally through console using tsql, but not using php.
    Any ideas?
     
  5. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Unless you installed on alternate port, isn't MSSQL on 1433?

    Mike
     
  6. chrismfz

    chrismfz Well-Known Member

    Joined:
    Jul 4, 2007
    Messages:
    109
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Greece
    cPanel Access Level:
    DataCenter Provider
    That was a typo sorry. It's 1433.
     
  7. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    If you're using a firewall such as CSF, you'll want to make sure that you add 1433 to the TCP_OUT exception list. Otherwise your server will not be able to connect outbound to the port.

    Although, if you've connected to the same MSSQL server via the commandline of the cPanel server, firewall blocking likely is not the issue.

    Mike
     
Loading...

Share This Page