PHP 5.5 and MSSQL driver: Installing ODBC Driver 11 in Windows Server 2012 R2
Asked Answered
P

1

9

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?

Prepositor answered 26/1, 2015 at 13:3 Comment(0)
V
12

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.

Veinstone answered 2/2, 2015 at 18:0 Comment(2)
Thanks a lot, I'll try that and reply here.Prepositor
The x64 was not an option for me, only x86 or amd64. x86 would not install, tried amd64 and it would install... any ideas what gives?Langouste

© 2022 - 2024 — McMap. All rights reserved.