Sql Server support drivers are not loaded in php.ini.

Discussion in 'Installation/Configuration' started by mnzava, Sep 29, 2018.

  1. mnzava

    mnzava Member

    Hi,
    Sql Server support drivers are not loaded in php.ini.
    I did Ubuntu ISPConfig setup on 18.04 LTS using this link: https://www.howtoforge.com/tutorial...l-pureftpd-bind-postfix-doveot-and-ispconfig/
    Everything went fine. But i wanted to add support for connection to Microsoft SQL Server support. I followed instruction for ODBC setup from this microsoft link: https://docs.microsoft.com/en-us/sq...bc-driver-for-sql-server?view=sql-server-2017
    Then i installed Microsoft drivers for PHP here: https://docs.microsoft.com/en-us/sq...ation-tutorial-linux-mac?view=sql-server-2017
    Code:
    sudo pecl install sqlsrv
    sudo pecl install pdo_sqlsrv
    sudo su
    echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30-pdo_sqlsrv.ini
    echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20-sqlsrv.ini
    exit
    Configure driver loading
    Code:
    sudo su
    apt-get install libapache2-mod-php7.2
    a2dismod mpm_event
    a2enmod mpm_prefork
    a2enmod php7.2
    echo "extension=pdo_sqlsrv.so" >> /etc/php/7.2/apache2/conf.d/30-pdo_sqlsrv.ini
    echo "extension=sqlsrv.so" >> /etc/php/7.2/apache2/conf.d/20-sqlsrv.ini
    exit
    Then i restarted apache.
    I can see sqlsrv and pdo_sqlsrv .ini files in /etc/php/7.2/cli/conf.d but are not seen in /etc/php/7.2/fpm/conf.d folder.
    i can see these modules sqlsrv and pdo_sqlsrv with command php -m
    Now, the issue am facing is i cant see these drivers loaded in php.ini.

    Any help?
     

Share This Page