CorefinityCorefinityDocs
Open the Control PanelControl Panel
PHP settings · 5 of 6

Get memory, upload and execution limits

Answers the site's memory limit, upload size and execution time, each with the bounds of the site's platform and size, and the version a change sends back.

GET/api/corestack/sites/{site}/php-settings

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Returns

200 The three settings and their bounds.

Fields of the 200 answer
applyobjectRequired

Whether a saved set of rules is live on the site.

Fields
applied_atstring or nullRequired
detailany

Sent only by the sets that have more to say, such as HTTP authentication.

errorstring or nullRequired
operationobject or any or nullRequired

The change that is applying the set, while one is running.

statestringRequired

Such as applied or applying.

state_labelstringRequired
boundsobjectRequired

The bounds of the platform and size, before the site's own values.

container_memory_limit_bytesintegerRequired

The memory PHP has on this site.

notesarray of objects

What the environment's creation changed to fit its size, while that still applies. Usually empty.

Fields of each item
codestringRequired

Such as php_settings_clamped.

textstringRequired
php_versionstring or nullRequired
platformstringRequired
settingsobjectRequired
Fields
max_execution_timeobjectRequired

One of the three settings with its bounds. Sizes are in bytes, times in seconds.

Fields
defaultintegerRequired
maxintegerRequired
minintegerRequired
optionsarray of integers

The only values accepted, when the setting takes a fixed list.

stepintegerRequired
unitstringRequired
bytesseconds
valueintegerRequired
memory_limitobjectRequired

One of the three settings with its bounds. Sizes are in bytes, times in seconds.

Fields
defaultintegerRequired
maxintegerRequired
minintegerRequired
optionsarray of integers

The only values accepted, when the setting takes a fixed list.

stepintegerRequired
unitstringRequired
bytesseconds
valueintegerRequired
post_max_sizeobjectRequired

Follows the upload size; it is not set on its own.

Fields
defaultintegerRequired
maxintegerRequired
minintegerRequired
optionsarray of integers

The only values accepted, when the setting takes a fixed list.

stepintegerRequired
unitstringRequired
bytesseconds
valueintegerRequired
upload_max_filesizeobjectRequired

One of the three settings with its bounds. Sizes are in bytes, times in seconds.

Fields
defaultintegerRequired
maxintegerRequired
minintegerRequired
optionsarray of integers

The only values accepted, when the setting takes a fixed list.

stepintegerRequired
unitstringRequired
bytesseconds
valueintegerRequired
tierstringRequired

The site's size.

versionintegerRequired

The write token. Send it back with a change.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409provisioningThe site is still being created. Try again in a few minutes.
422not_availableThe tool does not apply to this object.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/sites/1042/php-settings \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "apply": {
    "applied_at": null,
    "error": null,
    "operation": null,
    "state": "applied",
    "state_label": "Applied"
  },
  "bounds": {
    "container_memory_limit_bytes": 2617245696,
    "max_execution_time": {
      "options": [
        60,
        120,
        300
      ]
    },
    "memory_headroom_bytes": 268435456,
    "memory_limit": {
      "max": 2147483648,
      "min": 134217728,
      "step": 67108864
    },
    "platform": "wordpress",
    "post_max_size": {
      "max": 1073741824,
      "min": 2097152,
      "step": 1048576
    },
    "tier": "M",
    "upload_max_filesize": {
      "max": 1073741824,
      "min": 2097152,
      "step": 1048576
    }
  },
  "container_memory_limit_bytes": 2617245696,
  "notes": [],
  "php_version": "8.4",
  "platform": "wordpress",
  "settings": {
    "max_execution_time": {
      "default": 300,
      "max": 300,
      "min": 60,
      "options": [
        60,
        120,
        300
      ],
      "step": 60,
      "unit": "seconds",
      "value": 300
    },
    "memory_limit": {
      "default": 536870912,
      "max": 2147483648,
      "min": 134217728,
      "step": 67108864,
      "unit": "bytes",
      "value": 536870912
    },
    "post_max_size": {
      "default": 268435456,
      "max": 1073741824,
      "min": 2097152,
      "step": 1048576,
      "unit": "bytes",
      "value": 268435456
    },
    "upload_max_filesize": {
      "default": 268435456,
      "max": 1073741824,
      "min": 2097152,
      "step": 1048576,
      "unit": "bytes",
      "value": 268435456
    }
  },
  "tier": "M",
  "version": 12
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT