2017-08-14 08:55
浏览 78

用于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

图片转代码服务由CSDN问答提供 功能建议

将Azure门户网站上的PHP版本从5.6更改为7.1将成功。 但是当我从一个php文件运行phpinfo()时,它仍然向我显示PHP的旧版本5.6.31。我上传到Azure Web App的代码也不理解7.1的更改..

我已经从Azure CLI更新了PHP版本并重新启动了服务器。 但没有运气:(还有其他人有其他选择吗?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

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" ?>
          <add name="FastCGIHandler" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="D:\Program Files (x86)\PHP\v7.1\php-cgi.exe" />

    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

    解决 无用
    打赏 举报

相关推荐 更多相似问题