Azure Linux App Service custom options

on 2017-10-01

Earlier this week; I was attempting to set the PHP max upload size within a 'Linux App Service' on Azure.

This should be a straight forward process and should be an option within the application settings. Alas, like all fun things, this is not the case but super easy to change.

In our case, we created a php.ini file within a directory called phpini. This is our customised version and read before the default php.ini.

To alter the max upload size, the custom php.ini needs to have:

# Custom changes to PHP.ini file

From this, if you then edit the App Service and add the following application setting:

PHP_INI_SCAN_DIR /home/site/wwwroot/phpini:/usr/local/etc/php</code>

After a restart of the App Service, a quick check of php_info(); will show the new upload size.