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

corestack_php_runtime_copy

Copy PHP settings to other environments.

Scope writeAsks you to confirmRuns as a taskNo secrets returned
On this page

When to use it

Copy a row's PHP extensions, settings, FPM and custom php.ini to other environments of the same site, now or tonight. One task follows every target's change and answers each target's outcome. Production targets need confirm_production.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_php_runtime_copy with site_id 4211, target_site_ids [4212], parts ["extensions","settings","fpm"]. (Copy PHP settings to other environments.) 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
confirm_productionbooleanConfirmation

Required when a target is a production environment.

partsarray of stringsRequired

What to copy: extensions, settings, fpm, ini. Up to 4 items.

extensionssettingsfpmini
site_idintegerRequired

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

target_site_idsarray of integersRequired

The rows to copy to: other environments of the same site, each once. Up to 20 items.

Your assistant fills in a confirmation only after you agree.

Example call

tools/call
{
  "name": "corestack_php_runtime_copy",
  "arguments": {
    "site_id": 4211,
    "target_site_ids": [
      4212
    ],
    "parts": [
      "extensions",
      "settings",
      "fpm"
    ]
  }
}

If it is refused

ReasonWhat to do
invalid_argumentsA target named twice, or a value the route refuses; fields names the argument.
copy_target_invalidA target is not another environment of the source's site; target_site_ids lists only the site's other environments.
confirmA target is a production environment; ask the person, then call again with confirm_production: true.
feature_offparts names ini while the custom php.ini is switched off, or apply: "tonight" needs the maintenance window queue, which is switched off; leave that out.
managed_elsewhereAnother control panel manages this row; change it there.
work_failedNo target applied or queued its change (each was refused or failed); the result's changes gives every target's outcome. When only some fail, the task completes and changes says which.
switched_offA target's outcome in changes: the exec kill switch is off, which stops PHP changes on a row on the new runtime; stop and tell the person.
runtime_lockedA target's outcome in changes: Corefinity has locked that row's PHP configuration; tell the person.
ini_invalidA target's outcome in changes: the custom php.ini does not pass the validator on that row's image; its details carry the diagnostics.
busyA target's outcome in changes: another change is running on that row; copy to it again later.
change_pendingA target's outcome in changes: a change is already queued for that row's window; apply or cancel it first (corestack_pending_changes_list).
batch_windowA target's outcome in changes: that row's change can only apply inside its maintenance window; copy again with apply: "tonight".
runtime_not_adoptedA target's outcome in changes: that row is not on the new runtime and cannot move onto it now; its details carry the adoption state.
staleA target's outcome in changes: that row changed while the copy was applied; copy to it again.
conflictA target's outcome in changes: that row's PHP files were changed outside the Control Panel and Corefinity staff review them first; tell the person.
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.
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