duanjian7343 2014-10-24 11:35
浏览 68
已采纳

从运行PHP 5.5的Azure网站连接Azure SQL数据库?

If you setup an Azure website to run PHP 5.5, the "sqlsrv" extension disappears, presumably because the current release of that extension doesn't support past PHP 5.4. As you can see from that post, Microsoft has been "working on" an updated sqlsrv extension since July 2013. The official blog for this extension hasn't been updated since Oct 2012, and the last post that was actually about the sqlsrv extension is from March 2012.

There is an unofficial version of the sqlsrv extension that supports PHP 5.5, but you can't install custom PHP extensions on an Azure managed web site.

As far as I can tell, that means you cannot connect to a Azure SQL data from an Azure manage web site, and it doesn't look like Microsoft is in a rush to fix this. I'm just about to give up on using PHP 5.5 + SQL Server on Azure.

However, I'm hoping there is something I'm missing. Is it possible to run a PHP 5.5 app as a managed web site on Azure and connect to SQL Server?

  • 写回答

2条回答 默认 最新

  • duanguane1670 2014-12-22 20:46
    关注

    Microsoft has now released support for PHP 5.5 and 5.6 connections via their Microsoft Drivers for PHP for SQL Server PHP extension. Version 3.2 (current as of April 1st, 2015) supports PHP 5.4, 5.5, and 5.6.

    As a result, Azure PHP web apps should be able to connect to Microsoft SQL Server "out of the box" without having to install any additional drivers.

    Note on Azure terminology change since question was posted: "Websites is now Web Apps in App Service"

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?