Back in November, we announced the availability of PHP 7 on App Service in an experimental capacity. With that announcement you were able to leverage PHP 7 (x86) on App Service using a site extension. A few weeks later, a second site extension was released which delivered PHP 7 (x64) support on App Service. We would like to thank the community for their resounding support and feedback with over 600 downloads combined between the two site extensions.
PHP 7.0 is now generally available
Starting today, you will see PHP 7.0 (7.0.5 at time of writing) available as an option in the portal under Web App > Settings > Application Settings > PHP version.
Another significant milestone in this release is for the first time, we are supporting both x86 and x64 builds of PHP in App Service.
How do I choose between 32-bit and 64-bit PHP on App Service?
In Azure App Service, we use the platform selector in the portal to determine the “Bitness” of the underlying Web Worker process as well as the PHP Runtime. What this means is if you want to enable 64-bit PHP 7, you will need to follow these steps from the General settings section of the Application Settings blade:
- Select 7.0 from the PHP version drop-down list box
- Toggle the platform selector to 64-bit
- Click Save to apply the changes
Supportability differences between PHP 5.x & PHP 7.0
There are a few differences between support in PHP on App Service in which we would like to call out to avoid confusion.
64-bit platform support will not be enabled in PHP 5.x
Although we are supporting 64-bit versions of PHP 7.0 on Azure App Service, we will not be enabling 64-bit version support for PHP 5.x on the platform. This is due to 64-bit versions of PHP 5.x are marked as experimental.
Microsoft SQL Server and Azure SQL DB support for PHP 7.0
Microsoft Driver for PHP for SQL Server (php_sqlsrv) is in preview and has support for PHP 7 (x86 and x64). The SQL Server team is currently working on the driver, and will have a GA release in the coming months. To learn more about how to use the preview driver with Azure App Services, follow the instructions outlined in the article on Configuring PHP under How to: Enable extensions in the default PHP runtime.
Retirement of PHP 5.4
As of September 3, 2015, PHP 5.4 has been marked as unsupported by The PHP Group. What this means to you is, there will be no more updates to that version, this includes security fixes. To avoid the potential for security issues arising on Azure App Service, we will be working to retire the support of PHP 5.4.
Migrating from PHP 5.4
As we work towards retiring support for PHP 5.4, we strongly encourage customers upgrade to a supported version of PHP. Our plan is to update the default version of PHP to PHP 5.6 (as PHP 5.5 will be unsupported soon as well). This will impact customers who have not explicitly set their version of PHP in the Portal. If you would like to investigate how to migrate from PHP 5.4 to another version of PHP, there are some great migration articles available on the Appendices page of PHP.net.
Bring your own PHP 5.4
It will be possible to remain on PHP 5.4 using the bring your own runtime feature in Web Apps.
We are happy to bring support for PHP 7.0 and the next generation of PHP applications to Azure App Service.