PHP configuration

Silverstripe Cloud supports multiple PHP versions, which include 5.6, 7.1, 7.2, 7.3, 7.4, 8.1, 8.2 and 8.3.

You set your PHP version as follows:

php_settings:
  version: 8.1

PHP versions are supported for two years after their initial release, with an additional year for critical security issues only. We recommend keeping your PHP version up to date and set to the latest version. See PHP support timelines for specific dates.

You can change settings that apply for command line PHP like so:

php_settings:
  cli:
    memory_limit: '1024M'

or alternatively for web server PHP:

php_settings:
  http:
    max_execution_time: '60'

or apply settings to both the web server and the command line at the same time:

See PHP INI settings docs for more information on which individual settings can be used.

Settings for extensions

Some settings for extensions may need to be applied within a specific section of the PHP configuration file. These settings need to have the INI section name and a forward slash prefixed to the setting name, with the setting name surrounded by quotes:

php_settings:
  http:
    'Session/session.cookie_samesite': 'Strict'

In some cases, wrapping the setting value in double and single quotes is needed to prevent PHP from converting the setting value to a falsey value, for example:

php_settings:
  http:
    'Session/session.cookie_samesite': '"None"'

Default settings

Default values for common PHP settings are below

php_settings:

  http:
    max_execution_time: '30'
    memory_limit: '128M'
  cli:
    memory_limit: '1024M'
    max_execution_time: '0'

Was this answer helpful? Yes No

Sorry we couldn't be helpful. Help us improve this article with your feedback.