corestack_ php_ settings_ update
Change PHP settings.
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
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.
nowwindowtonightmax_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.falseopts 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".trueopts it back in. Saved at once, also whenapplyistonight; send the three settings ascorestack_php_settings_getshows them to change only this. The site itself is changed first (it takes effect within seconds whereruntime_readyistrue, otherwise when the row's runtime is updated), and only then the three settings: a site that cannot be reached is refusedunavailableand nothing at all is changed, and if the three settings are then refused,app_cache_headeris put back as it was. WordPress rows only. Present only while the person's Control Panel offers it (corestack_php_settings_getthen answersapp_cache_header{enabled, applies}); otherwise naming it isinvalid_arguments.
Example 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
| Reason | What to do |
|---|---|
invalid_arguments | A 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). |
stale | The settings changed since you read them; read corestack_php_settings_get again and call with its new version. |
feature_off | apply: "tonight" needs the maintenance window queue, which is switched off; leave apply out to make the change now. |
change_pending | A change is already queued for this row's maintenance window; apply or cancel it first (corestack_pending_changes_list). |
switched_off | The 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. |
unavailable | app_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). |
busy | deployment_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_locked | On a row on the new runtime: Corefinity has locked its PHP configuration, so nothing was changed; tell the person (Corefinity support can unlock it). |
removed | The row has been removed. |
deleted | The site is deleted (in its grace period); restore it with corestack_site_restore_deleted first. |
provisioning | The site is still being created; wait for corestack_site_provisioning_get to finish. |
not_available | This 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. |
conflict | The 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_elsewhere | Another 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_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The 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_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |
The same task elsewhere
Was this helpful?