Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Custom Flags PHP easy apache 4

Discussion in 'EasyApache' started by andryus, Jan 3, 2017.

  1. andryus

    andryus Registered

    Joined:
    Feb 11, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    Hello,

    I need to build PHP 5.5 with custom flags, under easy apache 3 it is easy:

    ----

    Edit /var/cpanel/easy/apache/rawopts/all_php5 and add this line in the
    file as follows:

    --with-mssql=/usr/local/freetds

    Run easyapache and it will build with mssql support.

    ----

    But, under easy apache 4 i does not know how i can do these procedures, i have created the file with the content but the custom flag is not loaded when i click into the provision button.

    Any one can help me on this please?

    Thanks!
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,777
    Likes Received:
    120
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    See:

    EasyApache 4 PDO_DBLIB (mssql support)

    I believe the ODBC php module they are referring to is ea-phpXX-php-odbc

    In your case, for PHP 5.5, this would be ea-php55-php-odbc

    Which you can install on the server by doing:

    Code:
    yum install ea-php55-php-odbc
    I really don't have any experience with using MSSQL, so this is where my help ends.

    Of note, PHP 5.5 is end-of-life, it went end of life in July 2016:

    PHP: Unsupported Branches

    If your application is depending on PHP 5.5, it probably needs an update.
     
  3. andryus

    andryus Registered

    Joined:
    Feb 11, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    Hello, thanks for your reply, but i need MSSQL extension support, instead of pdo_dblib

    Regards.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,936
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. andryus

    andryus Registered

    Joined:
    Feb 11, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    Hello Michael,

    Thanks for your reply, in terms of code, the MSSQL and pdo_dblib connection are distinct , i have many customers that require the MSSQL option enabled for their site.

    Example:

    mssql:

    Code:
    <?php
    // El servidor con el formato: <computer>\<instance name> o 
    // <server>,<port> cuando se use un número de puerto diferente del de defecto
    $server = 'KALLESPC\SQLEXPRESS';
    
    // Connect to MSSQL
    $link = mssql_connect($server, 'sa', 'phpfi');
    
    if (!$link) {
        die('Algo fue mal mientras se conectaba a MSSQL');
    }
    ?>
    
    PDO_DBLIB:

    Code:
    
    $myServer = "server name";
    $myUser = "username";
    $myPass = "pword";
    $myDB = "dbname";
    
    try {
      # MS SQL Server and Sybase with PDO_DBLIB
      $DBH = new PDO("dblib:host=$myServer;dbname=$myDB", $myUser, $myPass);
    }
    catch(PDOException $e) {
       echo $e->getMessage();
    }
    
    Regards.
     
  6. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,777
    Likes Received:
    120
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    The script that you are using may be in need of an update.

    PHP: mssql_connect - Manual

    PDO is typically where all database connections are moving to in PHP.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice