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 java大作业爬取网页
  • ¥15 怎么获取欧易的btc永续合约和交割合约的5m级的历史数据用来回测套利策略?
  • ¥15 有没有办法利用libusb读取usb设备数据
  • ¥15 为什么openeluer里面按不了python3呢?
  • ¥15 关于#matlab#的问题:训练序列与输入层维度不一样
  • ¥15 关于Ubuntu20.04.3LTS遇到的问题:在安装完CUDA驱动后,电脑会进入卡死的情况,但可以通过键盘按键进入安全重启,但重启完又会进入该情况!
  • ¥15 关于#嵌入式硬件#的问题:树莓派第一天重装配置python和opencv后第二天打开就成这样,瞎捣鼓搞出来文件夹还是没把原来的界面调回来
  • ¥20 Arduino 循迹小车程序电路出错故障求解
  • ¥20 Arduino 循迹小车程序电路出错故障求解
  • ¥15 C++数组中找第二小的数字程序纠错