简体   繁体   English

为什么在XAMPP 7.1.1 / PHP 7.1.1的PHP Info中不会显示SQLSRV?

[英]Why won't SQLSRV show up in PHP Info on XAMPP 7.1.1/PHP 7.1.1?

I have XAMPP installed but SQLSRV won't show up in PHP info from localhost:81 (81 is the port through which my localhost is accessible). 我已经安装了XAMPP,但是SQLSRV不会显示在来自本地主机的PHP信息中:81(81是可访问我的本地主机的端口)。

I downloaded the official SQLSRV drivers from Microsoft and added them to my php.ini like this: 我从Microsoft下载了官方的SQLSRV驱动程序,并将它们添加到我的php.ini中,如下所示:

在此处输入图片说明

I also tried the x86 drivers instead, but neither work! 我也尝试了x86驱动程序,但是都没有用!

The driver files are located as they should be in C:\\xampp\\php\\ext 驱动程序文件位于C:\\ xampp \\ php \\ ext中

Is it just that SQLSRV doesn't work with PHP 7.1.1 yet? 仅仅是SQLSRV不能与PHP 7.1.1一起使用吗? Where can I find the latest drivers? 在哪里可以找到最新的驱动程序? I downloaded and used SQLSRV40 and SQLSRV30, neither work at all. 我下载并使用了SQLSRV40和SQLSRV30,但它们都不起作用。

Note: SQL Server Native Client 11 is installed 注意:已安装SQL Server Native Client 11

I had the same problem and wasted a lot of time trying to fix it. 我遇到了同样的问题,浪费了很多时间来解决它。 What solved it for me was quite simple: - I uninstalled XAMPP and reinstalled the 7.0.15 / PHP 7.0.15 version 为我解决的问题非常简单:-我卸载了XAMPP,然后重新安装了7.0.15 / PHP 7.0.15版本
- I added the x86 drivers to C:\\xampp\\php\\ext and also to php.ini -我将x86驱动程序添加到C:\\ xampp \\ php \\ ext以及php.ini中

At the moment it seems that SQLSRV isn't working with PHP 7.1.1 yet. 目前看来,SQLSRV尚未与PHP 7.1.1一起使用。 I hope this helps you out. 我希望这能够帮到你。

Remove this line from php.ini: 从php.ini中删除此行:

extension=php_sqlsrv_7_ts_x64.dll 延长= php_sqlsrv_7_ts_x64.dll

and try again 然后再试一次

It should show up in Registered PHP Streams when you view PHP info 当您查看PHP信息时,它应该显示在Registered PHP Streams中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM