---
title: "corestack_php_ini_validate"
url: https://docs.corefinity.com/mcp/tools/corestack_php_ini_validate
type: tool
last_updated: 2026-11-13
feature: php-settings
related:
  - https://docs.corefinity.com/api/reference/runtime/check-php-ini.md
  - https://docs.corefinity.com/guides/sites/software-and-services/php-settings-and-php-ini.md
---
# corestack_php_ini_validate

**Check a php.ini.** Check a custom php.ini for a row with the same validator a save uses, without saving it or touching the site: each problem with its line, column, severity and suggestion, and what the php.ini would change. Scope: read.

- Scope: `read`
- Runs as a task: no

## When to use it

Check a custom php.ini for a row before saving it, with the same validator a save uses. It answers `ok`, each problem with its line, column, severity, code and suggestion (`diagnostics`), and what the php.ini would change (`effective`). Send draft `settings` or `extensions` to judge it against the form you are about to save, and `image` to preview a version change. Nothing is saved and the site is not touched. Save it with corestack_php_ini_update.

A directive the platform fixes answers code `locked` with its reason. Among them: `arg_separator.input` on every platform, and `variables_order`, which is accepted only as letters of EGPCS that keep G, such as `GPCS` (Magento 2 fixes it whole), because the platform's routers read the query string.

## Inputs

- `site_id` (integer, ≥ 1, required): The row: the site or one of its environments.
- `custom_ini` (string, required): The whole custom php.ini to check.
- `settings` (object): Draft form settings to judge it with, {directive: value}.
- `extensions` (array of string, up to 200 items): Draft extensions to judge it with.
- `image` (string, up to 255 characters): A version change's image; default the row's.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "custom_ini": {
      "description": "The whole custom php.ini to check.",
      "type": "string"
    },
    "extensions": {
      "description": "Draft extensions to judge it with.",
      "items": {
        "maxLength": 64,
        "type": "string"
      },
      "maxItems": 200,
      "type": "array"
    },
    "image": {
      "description": "A version change's image; default the row's.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "settings": {
      "description": "Draft form settings to judge it with, {directive: value}.",
      "type": "object"
    },
    "site_id": {
      "description": "The row: the site or one of its environments.",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "custom_ini"
  ],
  "type": "object"
}
```

## Refusals

- `feature_off`: PHP configuration is not switched on in the Control Panel yet.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_php_ini_validate",
  "arguments": {
    "site_id": 4211,
    "custom_ini": "max_input_vars = 5000\nrealpath_cache_size = 8M\n"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_php_ini_validate with site_id 4211, custom_ini max_input_vars = 5000
realpath_cache_size = 8M
. (Check a php.ini.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/php-runtime/validate](https://docs.corefinity.com/api/reference/runtime/check-php-ini.md)
- Guide: [PHP configuration](https://docs.corefinity.com/guides/sites/software-and-services/php-settings-and-php-ini.md)
