PHP configuration

PHP versions

Environments within your stack can be modified to run a specific version of PHP by requesting it via Service Desk. You can see the version of PHP you are running within the Silverstirpe Cloud dashboard. We recommend keeping your PHP version up to date.  See PHP support timelines for specific dates.

Configuration

We generally don't recommend configuring PHP via ini_set calls inside your custom PHP code, nor by using php_value inside .htaccess files (exception: memory_limit, see below).

Reconfiguring PHP using those methods may conflict with platform internals and lead to instability and security issues.

The following configuration settings are explicitly reserved for internal purposes:

  • auto_prepend_file
  • auto_append_file

memory_limit

The default memory_limit configuration is 128 MB. You can increase this to 256 MB with ini_set('memory_limit', '256M'); in your code. Please call this on a per-script basis. Increasing the limit for all requests increases the likelihood of server instability with high traffic. If you have a script which requires more than 256 MB, we typically recommend making it a task, runnable from a cron job on a schedule. Please raise a ticket via the Service Desk for help with this.

Was this answer helpful? Yes No

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