系统不支持:sqlsrv
需要一下几个环节
1.准备检测php版本
查看 VC 版本
查看操作系统位数:X86(32位) 和X64
2.下载php的sqlserver库
extension=php_sqlsrv_74_nts_x64.dll
extension=php_pdo_sqlsrv_74_nts_x64.dll
extension=php_sqlsrv_74_nts_x64
extension=php_pdo_sqlsrv_74_nts_x64
3.下载地址
微软官方各个版本库
https://learn.microsoft.com/en-us/sql/connect/php/release-notes-php-sql-driver?view=sql-server-ver16#previous-releases
php7.4 ~8.1
https://go.microsoft.com/fwlink/?linkid=2199011
New item | Details |
---|---|
Added support for PHP 8.1. | |
Dropped support for PHP 7.3. | |
Dropped support for macOS Mojave, Ubuntu 16.04, Alpine 3.11 and 3.12. | |
Added support for Windows 11 and Windows Server 2022. | |
Added support for macOS Monterey, Debian 11, Ubuntu 21.04 and 21.10, Alpine 3.13, 3.14 and 3.15. | |
Added support for Apple M1 ARM64 hardware. | Requires ODBC Driver 17.8 or above. |
Added support for Table-valued Parameters. | |
Allowed setting PDO::ATTR_EMULATE_PREPARES at the connection level. | |
Adjusted connection keyword and value validation for more flexibility. |
解压后
4.下载sqlserver 驱动
Microsoft® ODBC Driver 13 for SQL Server® - Windows + Linux
https://www.microsoft.com/zh-CN/download/details.aspx?id=50420
本:
13.0.0.0
Date Published:
2017/1/20
File Name:
CHS\X64\msodbcsql.msi
CHS\X86\msodbcsql.msi
Linux_Install_Instructions.pdf
File Size:
4.1 MB
2.7 MB
353.1 KB
注意:此下载有多个文件可用。单击“下载”按钮后,系统将会提示你选择所需的文件。
5.如果不知道vc那个版本
可以下载
vc运行库合集一般会包含2005~2022年