PHP 5.5和MSSQL驱动程序:在Windows Server 2012 R2中安装ODBC驱动程序11 [英] PHP 5.5 and MSSQL driver: Installing ODBC Driver 11 in Windows Server 2012 R2

查看:281
本文介绍了PHP 5.5和MSSQL驱动程序:在Windows Server 2012 R2中安装ODBC驱动程序11的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有IIS 8.5的Windows Server 2012 R2,另一个是带有MSSQL 2012的服务器.我必须在IIS中安装PHP并连接到MSSQL,并且我没有Internet可用于Web PI.

我设法安装了PHP 5.5,并且能够运行phpinfo(),并且还确保从C:\php\php.ini加载php.ini.

我还能够加载sqlsrv驱动程序,它在示例sqlsrv.ClientBufferMaxKBSize 10240 10240中报告.

但是当我执行连接到数据库的php文件时,会收到一条消息

此扩展需要用于SQL Server的ODBC驱动程序11.访问以下URL,以下载用于x86的SQL Server的ODBC驱动程序11: http://go. microsoft.com/fwlink/?LinkId=163712

我去了那个网站,上面写着

驱动程序3.1版支持的操作系统包括Windows Server 2012 R2`.

版本3.1需要SQL Server的Microsoft ODBC驱动程序11(或更高版本)and points to http://www.microsoft.com/en-us/download/details.aspx?id=36434 `.

在该页面的系统要求"中,未列出WinServer 2012 R2.当我尝试安装msodbcsql.msi时,我收到消息

此产品的安装失败,因为此操作系统不支持该产品.有关支持的配置的信息,请参阅产品文档.

好吧,我现在被困住了.我需要在WinServer 2012 R2和IIS 8.5中连接到MSSQL 2012的PHP.但是其驱动程序需要ODBC 11,这似乎不支持最新的WinServer.

是否有希望,或者我需要等待微软在自己的驱动程序中支持自己的操作系统?

解决方案

请确保下载1033 \ x64 \ msodbcsql.msi(4.4 MB)安装程序.即使您使用的是PHP x86,但由于操作系统为x64,因此仍需要x64安装程序.我遇到了同样的问题,安装x64安装程序后,我的应用现在可以在PHP x86上使用.

I have a Windows Server 2012 R2 with IIS 8.5, and another server with MSSQL 2012. I must install PHP in IIS and connect to MSSQL, and I don't have Internet available for Web PI.

I managed to install PHP 5.5 and I'm able to run phpinfo(), and I also assured that php.ini is being loaded from C:\php\php.ini.

I was also able to load sqlsrv driver, it reports in example sqlsrv.ClientBufferMaxKBSize 10240 10240.

But when I execute a php file that connects to DB, I get a message

This extension requires the ODBC Driver 11 for SQL Server. Access the following URL to download the ODBC Driver 11 for SQL Server for x86: http://go.microsoft.com/fwlink/?LinkId=163712

I went to that site and it says

Supported operating systems for version 3.1 of the driver include Windows Server 2012 R2`.

It says

Version 3.1 requires Microsoft ODBC Driver 11 (or higher) for SQL Serverand points tohttp://www.microsoft.com/en-us/download/details.aspx?id=36434`.

In that page, in System Requirements, WinServer 2012 R2 is not listed. When I try to install msodbcsql.msi I get message

Installation of this product failed because it is not supported on this operation system. For information on supported configurations, see the product documentation.`

Well I'm now stuck. I need PHP in WinServer 2012 R2 and IIS 8.5 connecting to MSSQL 2012. But its driver requires ODBC 11, which seems to not support latest WinServer.

Is there any hope, or will I need to wait for Microsoft to support its own OS in its own drivers?

解决方案

Be sure to download the 1033\x64\msodbcsql.msi (4.4 MB) installer. Even though you are using PHP x86, you need the x64 installer since the OS is x64. I had the same issue and my app now works with PHP x86 after installing the x64 installer.

这篇关于PHP 5.5和MSSQL驱动程序:在Windows Server 2012 R2中安装ODBC驱动程序11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆