CorefinityCorefinityDocs
Open the Control PanelControl Panel
PHP and runtime · 4 of 22

corestack_php_settings_update

Change PHP settings.

Scope writeRuns as a taskNo secrets returnedCoreCluster
On this page

When to use it

Set a row's memory limit, upload size and execution time, within the bounds corestack_php_settings_get shows, at its version; now or tonight.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_php_settings_update with site_id 4211, version 3, memory_limit_bytes 805306368, upload_max_filesize_bytes 67108864, max_execution_time_seconds 120. (Change PHP settings.) Tell me what it returned.

Inputs

applystring

now (the default), or tonight in the row's maintenance window. window: the row's next maintenance window (tonight is kept as its alias). Defaults to now.

nowwindowtonight
max_execution_time_secondsintegerRequired

At least 1.

memory_limit_bytesintegerRequired

At least 1.

site_idintegerRequired

The row: the site or one of its environments. At least 1.

upload_max_filesize_bytesintegerRequired

At least 1.

versionintegerRequired

From corestack_php_settings_get. At least 0.

  • app_cache_header (boolean, optional): the row's application cache header. false opts the row out: the platform stops reporting whether the application's own page cache answered, so its traffic figures show the cached share as "not reported". true opts it back in. Saved at once, also when apply is tonight; send the three settings as corestack_php_settings_get shows them to change only this. The site itself is changed first (it takes effect within seconds where runtime_ready is true, otherwise when the row's runtime is updated), and only then the three settings: a site that cannot be reached is refused unavailable and nothing at all is changed, and if the three settings are then refused, app_cache_header is put back as it was. WordPress rows only. Present only while the person's Control Panel offers it (corestack_php_settings_get then answers app_cache_header {enabled, applies}); otherwise naming it is invalid_arguments.

Example call

tools/call
{
  "name": "corestack_php_settings_update",
  "arguments": {
    "site_id": 4211,
    "version": 3,
    "memory_limit_bytes": 805306368,
    "upload_max_filesize_bytes": 67108864,
    "max_execution_time_seconds": 120
  }
}

If it is refused

ReasonWhat to do
invalid_argumentsA value outside the row's bounds or steps (memory in whole steps, an execution time the row offers); fields.<argument> says what is allowed (corestack_php_settings_get gives the bounds).
staleThe settings changed since you read them; read corestack_php_settings_get again and call with its new version.
feature_offapply: "tonight" needs the maintenance window queue, which is switched off; leave apply out to make the change now.
change_pendingA change is already queued for this row's maintenance window; apply or cancel it first (corestack_pending_changes_list).
switched_offThe exec kill switch is off, which also stops every PHP change on a row already on the new runtime, and every app_cache_header change; nothing was changed; stop and tell the person.
unavailableapp_cache_header could not be put into the site (it is not running or could not be reached just now); nothing was saved, the three settings included; try again in a minute (if the message says the site did not confirm the change, the next attempt puts the site in line first).
busydeployment_running, command_running, exec_unresolved: with app_cache_header, something else is running on the site (a change, a deployment or its rollback, a command); nothing was changed; try again once it has finished (corestack_site_operations_list).
runtime_lockedOn a row on the new runtime: Corefinity has locked its PHP configuration, so nothing was changed; tell the person (Corefinity support can unlock it).
removedThe row has been removed.
deletedThe site is deleted (in its grace period); restore it with corestack_site_restore_deleted first.
provisioningThe site is still being created; wait for corestack_site_provisioning_get to finish.
not_availableThis row's PHP settings are not managed here (a custom tier, or a row the Control Panel does not manage these settings for). On app_cache_header (fields): the row is not WordPress, so the platform sends no application cache header there to opt out of; nothing was changed.
conflictThe row's PHP files were changed outside the Control Panel, and Corefinity staff review them before the next change; nothing was changed; tell the person.
managed_elsewhereAnother control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT