Install the PHP drivers for Microsoft SQL Server

1.Tahap 1

yum install php-pdo php-pear php-devel

2. Tahap 2

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

3. Tahap 3

Add command in /etc/php.ini

extension=pdo_sqlsrv.so

extension=sqlsrv.so

Leave a Reply

Your email address will not be published.