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 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?