Sad Tux - Windows bias detected
This page contains Windows bias

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

Detected Bias Types
windows_first
windows_tools
powershell_heavy
missing_linux_example
Summary
The documentation page generally maintains parity between Windows and Linux, using zone pivots to separate platform-specific instructions. However, there are several signs of Windows bias: Windows instructions and examples often appear before Linux ones, especially in sections like 'Show the PHP version', 'Set the PHP version', and 'Change the site root'. Windows-specific tools and paths (e.g., KuduScript, d:\home\site, .dll extensions) are referenced in detail, sometimes with more step-by-step guidance than their Linux equivalents. The Windows deployment automation section is more elaborate, while the Linux section is more concise and refers out to external documentation (Oryx). Some examples, such as enabling diagnostic logs, are more detailed for Windows. There is also a heavier reliance on Windows-centric terminology and tools (e.g., Advanced Tools, KuduScript, .dll files) before mentioning Linux alternatives (.so files, NGINX config).
Recommendations
  • Ensure Linux instructions and examples are given equal prominence and detail as Windows, possibly by alternating the order or providing a summary table for both platforms.
  • Where Windows-specific tools (e.g., KuduScript, Advanced Tools) are mentioned, provide equivalent Linux tooling or clarify Linux alternatives (e.g., Oryx, SSH, Bash).
  • Expand Linux sections to include step-by-step guidance matching the detail given for Windows, especially for deployment automation and troubleshooting.
  • Avoid Windows-first ordering in sections; consider starting with Linux or providing a neutral introduction before platform pivots.
  • Where file paths or extension types are discussed (.dll vs .so), provide parallel examples and clarify compatibility requirements for both platforms.
  • Ensure troubleshooting and diagnostic sections include Linux-specific guidance and examples, not just references to external documentation.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-12 00:00 #99 completed Clean Clean
2026-01-11 06:20 #98 completed Clean Clean
2026-01-11 00:00 #95 cancelled Clean Clean
2026-01-10 00:00 #92 completed Clean Clean
2026-01-09 00:00 #87 cancelled Clean Clean
2026-01-08 00:00 #84 in_progress Clean Clean
2026-01-06 22:28 #78 completed Clean Clean
2025-12-29 18:00 #48 cancelled Biased Biased
2025-12-22 00:00 #24 cancelled Clean Clean
2025-12-15 00:00 #7 completed Clean Clean
2025-12-14 05:05 #6 completed Clean Clean

Flagged Code Snippets

In the Azure portal, select your app. Under **Development Tools** in the sidebar menu, select **Advanced Tools**, and then go to `d:\home\site` using SSH.

Create a directory in `d:\home\site` called `ini`. Then, create an *.ini* file in the `d:\home\site\ini` directory, for example, `settings.ini`, with the directives that you want to customize. Use the same syntax that you would use in a `php.ini` file.

For example, to change the value of [`expose_php`](https://php.net/manual/ini.core.php#ini.expose-php), run the following commands:

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:

   
::: 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.

## Change the site root

::: zone pivot="platform-windows"  

The web framework of your choice might use a subdirectory as the site root. For example, [Laravel](https://laravel.com/) uses the `public/` subdirectory as the site root.

To customize the site root, set the virtual application path for the app by using the [`az resource update`](/cli/azure/resource#az-resource-update) command. The following example sets the site root to the `public/` subdirectory in your repository:

By default, Azure App Service points the root virtual application path (`/`) to the root directory of the deployed application files (`sites\wwwroot`).

::: zone-end

::: zone pivot="platform-linux"

The web framework of your choice might use a subdirectory as the site root. For example, [Laravel](https://laravel.com/) uses the `public/` subdirectory as the site root.

The default PHP image for App Service uses NGINX, and you change the site root by [configuring the NGINX server with the `root` directive](https://docs.nginx.com/nginx/admin-guide/web-server/serving-static-content/). This [example configuration file](https://github.com/Azure-Samples/laravel-tasks/blob/main/default) contains the following snippet that changes the `root` directive:

Popular web frameworks let you access the `X-Forwarded-*` information in your standard app pattern. In [CodeIgniter](https://codeigniter.com/), the [is_https()](https://github.com/bcit-ci/CodeIgniter/blob/master/system/core/Common.php#L338-L365) function checks the value of `X_FORWARDED_PROTO` by default.

## Customize php.ini settings

If you need to make changes to your PHP installation, you can change any of the [php.ini directives](https://www.php.net/manual/ini.list.php) by using the following steps.

> [!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.

### <a name="Customize-non-PHP_INI_SYSTEM directives"></a>Customize non-PHP_INI_SYSTEM directives

::: zone pivot="platform-windows"  

To customize `PHP_INI_USER`, `PHP_INI_PERDIR`, and `PHP_INI_ALL` directives, add a `.user.ini` file to the root directory of your app.

Add configuration settings to the `.user.ini` file by using the same syntax that you would use in a `php.ini` file. For example, if you wanted to turn on the `display_errors` setting and set the `upload_max_filesize` setting to `10M`, your `.user.ini` file would contain this text: