About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
windows_first
⚠️
windows_tools
⚠️
powershell_heavy
⚠️
missing_linux_example
Summary:
The documentation generally provides parity between Windows and Linux instructions via platform pivots. However, there are several areas where Windows-specific tools (e.g., KuduScript, directory paths, DLLs) are mentioned or explained in more detail, and Windows instructions or concepts are presented first. Some sections (such as custom deployment scripts and Composer automation) are much more detailed for Windows, with Linux equivalents either missing or less explicit.
Recommendations:
- Ensure that all examples and instructions provided for Windows (such as custom deployment scripts, Composer automation, and enabling extensions) have equally detailed Linux equivalents.
- Avoid presenting Windows instructions or tools first by default; alternate the order or clarify that both platforms are equally supported.
- Where Windows-specific tools (like KuduScript) are mentioned, provide Linux-native alternatives or clarify their applicability to Linux environments.
- For sections that discuss directory structures or file extensions (e.g., .dll vs .so, d:\ paths vs /home/site), explicitly note the Linux equivalents and provide parallel examples.
- Expand the Linux 'Run Composer' and 'Run Bower, Gulp, or Grunt' sections to match the detail and step-by-step guidance given for Windows.
- Review all troubleshooting and advanced configuration sections to ensure Linux users are not left with less actionable guidance.
Create pull request
Flagged Code Snippets
Replace `<resource-group-name>` and `<app-name>` with names that are appropriate for your web app.
> [!NOTE]
> To address a development slot, include the parameter `--slot` followed by the name of the slot.
To show all supported PHP versions, run the following command:
::: zone-end
[!INCLUDE [outdated-runtimes](includes/outdated-runtimes.md)]
::: zone pivot="platform-windows"
## Run Composer
If you want App Service to run [Composer](https://getcomposer.org/) at deployment time, the easiest way is to include Composer in your repository.
From a local terminal window, change the directory to your repository root. Then, follow the instructions at [Download Composer](https://getcomposer.org/download/) to download `composer.phar` to the directory root.
Run the following commands. To run them, you need [npm](https://www.npmjs.com/get-npm) installed.
::: zone-end
## Set the PHP version
::: zone pivot="platform-windows"
To set the PHP version to 8.1, run the following command:
::: zone-end
[!INCLUDE [outdated-runtimes](includes/outdated-runtimes.md)]
::: zone pivot="platform-windows"
## Run Composer
If you want App Service to run [Composer](https://getcomposer.org/) at deployment time, the easiest way is to include Composer in your repository.
From a local terminal window, change the directory to your repository root. Then, follow the instructions at [Download Composer](https://getcomposer.org/download/) to download `composer.phar` to the directory root.
Run the following commands. To run them, you need [npm](https://www.npmjs.com/get-npm) installed.
For the changes to take effect, restart the app.
::: zone-end
## Enable PHP extensions
::: zone pivot="platform-windows"
The built-in PHP installations contain the most commonly used extensions. You can enable more extensions in the same way that you [customize php.ini directives](#customize-php_ini_system-directives).
> [!NOTE]
> The best way to see the PHP version and the current `php.ini` configuration is to call [`phpinfo()`](https://php.net/manual/function.phpinfo.php) in your app.
To enable other extensions, use the following steps:
1. Add a `bin` directory to the root directory of your app, and put the *.dll* extension files in it, for example, `mongodb.dll`. Make sure that the extensions are compatible with the PHP version in Azure, and that they're VC9 and non-thread-safe (NTS) compatible.
1. Deploy your changes.
1. Follow the steps in [Customize PHP_INI_SYSTEM directives](#customize-php_ini_system-directives), and add the extensions into the custom .ini file with the [extension](https://www.php.net/manual/ini.core.php#ini.extension) or [zend_extension](https://www.php.net/manual/ini.core.php#ini.zend-extension) directive: