Under the Linux server, the PHP version is 5.6. How to install the sqlsrv extension and the pdo_sqlsrv extension?
Why do I read online that 5.6 does not support the pdo-sqlsrv extension?
I use the Xiaoniao Cloud Linux server, which is installed with the Pagoda panel. I also refer to others online:
The first step is to install the source. The second step is to install the driver. The third step is to download the pdo-sqlsrv source code.
wget http://pecl.php.net/get/pdo_sqlsrv-5.6.1.tgz
tar -zxvf pdo_sqlsrv-5.6.1.tgzcd pdo_sqlsrv-5.6.1
/www/server/php/73/bin/phpize./configure --with-php-config=/www/server/php/73/bin/php-configmake && make install
echo "extension = pdo_sqlsrv.so" >> /www/server/php/73/etc/php.ini/etc/init.d/php-fpm-73 reload
/www/server/php /73/bin/php -m|grep -i sqlsrv
There are no these two extensions in php.ini
Edit php.ini, find the corresponding extension, delete the preceding semicolon, and then restart the service
Why do I read online that 5.6 does not support the pdo-sqlsrv extension?
I use the Xiaoniao Cloud Linux server, which is installed with the Pagoda panel. I also refer to others online:
The first step is to install the source. The second step is to install the driver. The third step is to download the pdo-sqlsrv source code.
wget http://pecl.php.net/get/pdo_sqlsrv-5.6.1.tgz
tar -zxvf pdo_sqlsrv-5.6.1.tgzcd pdo_sqlsrv-5.6.1
/www/server/php/73/bin/phpize./configure --with-php-config=/www/server/php/73/bin/php-configmake && make install
echo "extension = pdo_sqlsrv.so" >> /www/server/php/73/etc/php.ini/etc/init.d/php-fpm-73 reload
/www/server/php /73/bin/php -m|grep -i sqlsrv
There are no these two extensions in php.ini
Edit php.ini, find the corresponding extension, delete the preceding semicolon, and then restart the service