search
HomeTopicsPagoda PanelHow to install sqlsrv extension in Pagoda Panel PHP7.3 under Centos7

The following tutorial column of Pagoda Panel will introduce to you how to install the sqlsrv extension in Pagoda Panel PHP7.3 under Centos7. I hope it will be helpful to friends who need it!

Installing the sqlsrv extension in Pagoda Panel PHP7.3 under Centos7

Originally I chose php7.4, but after configuration, it kept prompting that the dynamic extension could not be loaded. Downgraded to php7.3.
After compiling and installing php7.3, do the following:
Join Microsoft’s source

curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssqlrelease.repo

You can find it at (https://packages.microsoft.com/config/rhel ), find the corresponding required version
Install the driver

#如果安装过,防止冲突可先卸载再安装
yum remove unixODBC

yum install msodbcsql mssql-tools unixODBC-devel

Download the pdo_sqlsrv expansion package, and unzip it

wget http://pecl.php.net/get/pdo_sqlsrv-5.6.1.tgz
tar -zxvf pdo_sqlsrv-5.6.1.tgz
cd pdo_sqlsrv-5.6.1

Use Corresponding php version of phpize

/www/server/php/73/bin/phpize
./configure --with-php-config=/www/server/php/73/bin/php-config
make && make install

Write extension

echo "extension = pdo_sqlsrv.so" >> /www/server/php/73/etc/php.ini
/etc/init.d/php-fpm-73 reload

Check whether it is successful

/www/server/php/73/bin/php -m|grep -i  sqlsrv

View all extensions

php -m

PS: Pay attention to your own PHP version. After installing PHP7.4 many times, it prompts that the dynamic extension cannot be loaded. I hope that successful experts can leave a comment.

The above is the detailed content of How to install sqlsrv extension in Pagoda Panel PHP7.3 under Centos7. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function