PHP lower version install on webapp

Ytowait Pvt Ltd 1 Reputation point
2022-08-27T02:49:57.52+00:00

I want to go with PAAS, my app PHP version is 5.6 and i dont want to upgrade it now as it creates many compatibility and some technical issues in my stable app. How to achieve my Own php version in PAAS. Please help me out.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Dillon Silzer 57,826 Reputation points Volunteer Moderator
    2022-08-27T03:01:50.713+00:00

    Hi @Ytowait Pvt Ltd

    You should be able to go into the app service and set the Major version to PHP5:

    In App Service > Setting > Configuration > General Settings > Major Version > Choose PHP5

    235403-image.png

    PHP on App Service (Documentation)

    https://github.com/Azure/app-service-linux-docs/blob/master/Runtime_Support/php_support.md

    -------------------------------------------

    If this is helpful please accept answer.


  2. VenkateshDodda-MSFT 24,951 Reputation points Microsoft Employee Moderator
    2022-08-29T05:12:57.117+00:00

    @Ytowait Pvt Ltd Thank you for reaching out to Microsoft Q&A. Apologize for the any inconvenience caused on this.

    As mentioned here in this GIT hub article, PHP 5.6 is end of life on Azure app service and app service currently supports PHP 7.4 or PHP 8.0 only. I would recommend you upgrade the PHP versions of your app to supported version on web app accordingly.

    Adding to the @Dillon Silzer suggestion, alternatively using Azure CLI cmdlet you can change run time PHP versions of the existing web app.

    az webapp config set --resource-group <ResourceGroupName> --name <WebAppName> --linux-fx-version "PHP|7.4"  
    

    If you are creating the webapp from the portal, you can select lower versions(available is PHP 7.4) of the supported runtime using the dropdown as shown below.

    235642-image.png

    Feel Free to reach back to me if you have any questions on this.

    0 comments No comments

  3. Lex Li (Microsoft) 6,037 Reputation points Microsoft Employee
    2022-09-02T04:11:52.973+00:00

    Your only hope out there is to build your own Docker image based on the PHP 5.6 Docker image you can find (several un-official there, so use with caution and accept the risks). Then this image can be used to deploy your web app on Azure App Service or Azure Kubernetes Service.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.