Learn about Centmin Mod LEMP Stack today
Register Now

Beta Branch add PHPMSSQL_ALWAYS variable for 123.09beta01+

Discussion in 'Centmin Mod Github Commits' started by eva2000, Jul 5, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    29,041
    6,590
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,785
    Local Time:
    10:02 PM
    Nginx 1.13.x
    MariaDB 5.5
    add PHPMSSQL_ALWAYS variable for 123.09beta01+

    To enable PHP mssql & PDO_ODBC drivers for PHP communicating with Microsoft SQL Server, you now need to set 2 variables in persistent config file that you either create or append to these 2 variables:

    Code (Text):
    PHPMSSQL='y'
    PHPMSSQL_ALWAYS='y'
    


    then run centmin.sh menu option 5 to recompile PHP to enable MS SQL sever extension support in PHP 5.4-5.6. The mssql extension is only supported in PHP 5.4-5.6 while PDO_ODBC driver support is available in PHP 5.4-5.6 and PHP 7.

    example mssql and PDO_ODBC driver support in PHP 5.6.23
    Code (Text):
    php --ini
    Configuration File (php.ini) Path: /usr/local/lib
    Loaded Configuration File:         /usr/local/lib/php.ini
    Scan for additional .ini files in: /etc/centminmod/php.d
    Additional .ini files parsed:      /etc/centminmod/php.d/a_customphp.ini,
    /etc/centminmod/php.d/curlcainfo.ini,
    /etc/centminmod/php.d/geoip.ini,
    /etc/centminmod/php.d/igbinary.ini,
    /etc/centminmod/php.d/imagick.ini,
    /etc/centminmod/php.d/mailparse.ini,
    /etc/centminmod/php.d/memcache.ini,
    /etc/centminmod/php.d/memcached.ini,
    /etc/centminmod/php.d/mssql.ini,
    /etc/centminmod/php.d/redis.ini,
    /etc/centminmod/php.d/zendopcache.ini,
    

    contents of .ini file for /etc/centminmod/php.d/mssql.ini
    Code (Text):
    cat /etc/centminmod/php.d/mssql.ini
    extension=mssql.so
    

    Code (Text):
    php --ri pdo
    
    PDO
    
    PDO support => enabled
    PDO drivers => mysql, odbc, sqlite
    

    Code (Text):
    php --ri mssql
    
    mssql
    
    MSSQL Support => enabled
    Active Persistent Links => 0
    Active Links => 0
    Library version => FreeTDS
    
    Directive => Local Value => Master Value
    mssql.allow_persistent => On => On
    mssql.max_persistent => Unlimited => Unlimited
    mssql.max_links => Unlimited => Unlimited
    mssql.min_error_severity => 10 => 10
    mssql.min_message_severity => 10 => 10
    mssql.compatability_mode => Off => Off
    mssql.compatibility_mode => Off => Off
    mssql.connect_timeout => 5 => 5
    mssql.timeout => 60 => 60
    mssql.textsize => Server default => Server default
    mssql.textlimit => Server default => Server default
    mssql.batchsize => 0 => 0
    mssql.datetimeconvert => On => On
    mssql.secure_connection => Off => Off
    mssql.max_procs => Unlimited => Unlimited
    mssql.charset => no value => no value
    

    Code (Text):
    php --ri PDO_ODBC
    
    PDO_ODBC
    
    PDO Driver for ODBC (unixODBC) => enabled
    ODBC Connection Pooling => Enabled, strict matching
    

    Code (Text):
    php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    ereg
    exif
    filter
    ftp
    gd
    geoip
    gettext
    gmp
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    libxml
    mailparse
    mbstring
    mcrypt
    memcache
    memcached
    mhash
    mssql
    mysql
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    PDO_ODBC
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    


    Continue reading...

    123.09beta01 branch
     
    Last edited: Jul 5, 2016