Silverstripe Cloud supports multiple PHP versions, which include
7.4. You set your PHP version as follows:
php_settings: version: 7.4
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.
- PHP 5.6: no longer supported and at risk of security vulnerabilities
- PHP 7.1: no longer supported and at risk of security vulnerabilities
- PHP 7.2: no longer supported and at risk of security vulnerabilities
- PHP 7.3: security support ends 6th December 2021
- PHP 7.4: active support ends 28th November 2021, security support ends 28th November 2022
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:
php_settings: global: memory_limit: '1024M'
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 values for common PHP settings are below
php_settings: global: 'date.timezone': 'Pacific/Auckland' http: max_execution_time: '30' memory_limit: '128M' cli: memory_limit: '1024M' max_execution_time: '0'