Remediation
From Azure Portalโ
- In the Azure portal, open the portal menu in the upper left.
- Go to
App Services. - Select each app.
- Under
Settingssection, click onConfiguration. - Select the
General settingspane and ensure that for aStackofPHP, theMajor VersionandMinor Versionreflect the latest stable and supported release.
Note: No action is required if PHP version is set to Off or is set with an empty value, as PHP is not used by your web app.
From Azure CLIโ
List the available PHP runtimes:
az webapp list-runtimes
To set the latest PHP version for an existing app, run the following command:
az webapp config set \
--resource-group {{resource-group-name}} \
--name {{app-name}} \
--linux-fx-version {{php-runtime-version}} \
--php-version {{php-version}}
From PowerShellโ
To set the latest PHP version for an existing app, run the following command:
Set-AzWebApp `
-ResourceGroupName {{resource-group-name}} `
-Name {{app-name}} `
-phpVersion {{php-version}}
Note: Currently there is no way to update an existing web app Linux FX Version setting using PowerShell, nor is there a way to create a new web app using PowerShell that configures the PHP runtime in the Linux FX Version setting.