Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

PHP 8.1 is now generally available.

The php.ini File

You can include a php.ini file with your App Engine application. This file lets you customize the behavior of the PHP interpreter directives.

See an example of the default php.ini configuration.

Using a custom php.ini file

Place the php.ini file in your application's base directory where your app.yaml file is located. It is loaded when the PHP interpreter is initialized, before running your application code.

The file follows the same syntax as other .ini files. A simple example might look like:

; This is a simple php.ini file on App Engine
; It enables output buffering for all requests by overriding the
; default setting of the PHP interpreter.
output_buffering = "On"

A list of the core directives, along with their changeable mode values, is published on

You can override any PHP directive that has one of the following changeable mode values:


You can enable a set of dynamically loadable extensions by using the extension directive.