PHPcentos7 安装sqlserver驱动及扩大

安装sqlserver驱动

sudo su

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

exit

sudo yum update

sudo yum remove unixODBC

#to avoid conflicts

sudo ACCEPT_EULA=Y yum install msodbcsql mssql-tools sudo yum install
unixODBC-devel

*Note: You need to make sure you install PHP 7 before you proceed to
step 2. The Microsoft PHP Drivers for SQL Server will only work for PHP
7+

 

安装sqlsrv和pdo_sqlsrv扩展

sudo pecl install sqlsrv

sudo pecl install pdo_sqlsrv

相关文章