简体   繁体   English

如何使用MSSQL配置XAMPP 3.2.2(PHP 7.2)版本?

[英]How to configure XAMPP v. 3.2.2 (PHP 7.2) with MSSQL?

I am running into a bit of an issue trying to configure MSSQL with XAMPP. 尝试使用XAMPP配置MSSQL时遇到了一个问题。 I used this video and this thread to setup MSSQL with XAMPP. 我使用了此视频该线程来使用XAMPP设置MSSQL。 I went over to MSPHPSQL releases here and downloaded the 7.2 version as I am running XAMPP 3.2.2 with PHP 7.2. 当我在PHP 7.2上运行XAMPP 3.2.2时,我转到此处的 MSPHPSQL版本并下载了7.2版本。 I have placed the php_pdo_sqlsrv_72_ts.dll and php_sqlsrv_72_ts.dll in the "XAMPP\\php\\ext" folder. 我已经将php_pdo_sqlsrv_72_ts.dllphp_sqlsrv_72_ts.dll放在“ XAMPP \\ php \\ ext”文件夹中。 Then, I went over to the php.ini file and added both extension=pdo_sqlsrv_72_ts and extension=sqlsrv_72_ts beneath the other extensions. 然后,我转到php.ini文件,并在其他扩展名下面添加了extension=pdo_sqlsrv_72_tsextension=sqlsrv_72_ts

However, when I start up the Apache Server and navigate to the PHPInfo, I do not see the pdo_sqlsrv_72_ts nor the sqlsrv_72_ts listed. 但是,当我启动Apache服务器并导航到PHPInfo时,没有看到列出的pdo_sqlsrv_72_tssqlsrv_72_ts I was wondering if anyone could help me figure out why it is not showing up in the PHPInfo as I believe I have made a mistake somewhere and that is why it is not showing up under PHPInfo. 我想知道是否有人可以帮助我弄清为什么它没有出现在PHPInfo中,因为我相信我在某个地方犯了一个错误,这就是为什么它没有出现在PHPInfo中。 Perhaps I used the wrong files or made a mistake when adding in the "extension=" part. 也许在添加“ extension =“部分时我使用了错误的文件或犯了一个错误。 Thanks in advance for any help and I appreciate it. 在此先感谢您的帮助,我们非常感谢。

EDIT My PHPInfo after I made the changes 进行更改后编辑我的PHPInfo

EDIT 2 With help from jetblack, we managed to solve it. 编辑2在jetblack的帮助下,我们设法解决了这个问题。 Turns out I downloaded the 64-bit files of the SQLSRV extension. 原来我下载了SQLSRV扩展的64位文件。 Downloading and installing the 32-bit versions made it work. 下载和安装32位版本使其可以工作。 Thank up for all the help. 感谢所有的帮助。

It seems "php_" prefixes are missing in your configuration. 您的配置中似乎缺少“ php_”前缀。 Try like the following: 尝试如下所示:

extension=php_sqlsrv_72_ts.dll
extension=php_pdo_sqlsrv_72_ts.dll

Also check prerequisites list. 还要检查先决条件列表。 You may need to download ODBC driver. 您可能需要下载ODBC驱动程序。 https://www.microsoft.com/en-us/download/details.aspx?id=50420 https://www.microsoft.com/en-us/download/details.aspx?id=50420

Also please verify if you downloaded correct version. 另外,请验证您是否下载了正确的版本。 (32 bit or 64 bit) (32位或64位)

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

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