duanhan8757 2017-08-14 08:55
浏览 79
已采纳

用于Azure Web App的phpinfo上显示的PHP版本错误

When changing the PHP version from 5.6 to 7.1 on my Azure Web App from the Azure Portal will succeed. But when I run phpinfo() from an php-file, it is still showing me the old version 5.6.31 of PHP.. Also my code that I uploaded to the Azure Web App doesn't understand the 7.1 changes..

I already updated the PHP version from the Azure CLI and restarted the server. But no luck :( Does anyone else have another option to try?

enter image description here

enter image description here

  • 写回答

1条回答 默认 最新

  • doubinchou4219 2017-08-15 05:05
    关注

    I cannot reproduce this behavior, but there are few options you could try.

    Option 1:

    Add a line to the Handler Mappings with the following values:

    Extension: *.php

    Processor path: D:\Program Files (x86)\PHP\v7.1\php-cgi.exe

    enter image description here

    Option 2:

    Create a web.config file and put it into the root folder of your website.

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <system.webServer>
        <handlers>
          <add name="FastCGIHandler" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="D:\Program Files (x86)\PHP\v7.1\php-cgi.exe" />
        </handlers>
      </system.webServer>
    </configuration>
    

    All pre-installed PHP runtimes could be find in D:\Program Files (x86)\PHP (x86) and D:\Program Files\PHP (x64).

    enter image description here

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题