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?
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
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).