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条)

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站