---
title: "Get what PHP runs with"
url: https://docs.corefinity.com/api/reference/runtime/get-php-effective-configuration
type: endpoint
last_updated: 2026-11-13
feature: php-settings
related:
  - https://docs.corefinity.com/guides/sites/software-and-services/php-settings-and-php-ini.md
  - https://docs.corefinity.com/mcp/tools/corestack_php_effective_get.md
---
# Get what PHP runs with

Answers the values PHP runs with on the site: the command line measured on the site, the web side and any
`.user.ini` calculated, with directives that hold secrets masked by name. The site must be on the runtime and
running. Try-it is off because the read runs a command on the site.

```http
GET /api/corestack/sites/{site}/php-runtime/effective
```

- Scope: `read`
- Two-factor: required on your account (all)
- Rate limit: 20 a minute
- Try it in the console: off. It has not been cleared for the console. Copy the request and run it yourself when you are sure.

## Path parameters

- `site` (integer, required): The id of a site row. A website's production site and each of its environments has its own id. Digits only.

## Request

### curl

```bash
curl https://manage.corefinity.com/api/corestack/sites/1042/php-runtime/effective \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->get('https://manage.corefinity.com/api/corestack/sites/1042/php-runtime/effective');

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/php-runtime/effective', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
  },
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.get(
    "https://manage.corefinity.com/api/corestack/sites/1042/php-runtime/effective",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 The effective configuration.

```json
{
  "cli": {
    "extensions": [
      {
        "name": "Core",
        "version": "8.4.13"
      },
      {
        "name": "redis",
        "version": "6.3.0"
      }
    ],
    "ini": [
      {
        "layer": "image",
        "measured": false,
        "name": "auto_prepend_file",
        "value": ""
      },
      {
        "layer": "platform",
        "measured": false,
        "name": "display_errors",
        "value": ""
      },
      {
        "layer": "image",
        "measured": true,
        "name": "max_execution_time",
        "value": "0"
      },
      {
        "layer": "form",
        "measured": true,
        "name": "max_input_vars",
        "value": "20000"
      },
      {
        "layer": "form",
        "measured": true,
        "name": "memory_limit",
        "value": "512M"
      },
      {
        "layer": "ini",
        "measured": true,
        "name": "realpath_cache_size",
        "value": "8M"
      },
      {
        "layer": "image",
        "measured": false,
        "name": "session.auto_start",
        "value": "0"
      },
      {
        "layer": "form",
        "measured": true,
        "name": "upload_max_filesize",
        "value": "256M"
      }
    ],
    "php_version": "8.4.13"
  },
  "fpm": {
    "extensions": [
      {
        "name": "Core",
        "version": "8.4.13"
      },
      {
        "name": "redis",
        "version": "6.3.0"
      }
    ],
    "ini": [
      {
        "layer": "image",
        "measured": false,
        "name": "auto_prepend_file",
        "value": ""
      },
      {
        "layer": "pool",
        "measured": false,
        "name": "display_errors",
        "value": ""
      },
      {
        "layer": "form",
        "measured": false,
        "name": "max_execution_time",
        "value": "300"
      },
      {
        "layer": "form",
        "measured": false,
        "name": "max_input_vars",
        "value": "20000"
      },
      {
        "layer": "form",
        "measured": false,
        "name": "memory_limit",
        "value": "512M"
      },
      {
        "layer": "ini",
        "measured": false,
        "name": "realpath_cache_size",
        "value": "8M"
      },
      {
        "layer": "image",
        "measured": false,
        "name": "session.auto_start",
        "value": "0"
      },
      {
        "layer": "form",
        "measured": false,
        "name": "upload_max_filesize",
        "value": "256M"
      }
    ],
    "php_version": "8.4.13"
  },
  "read_at": "2026-11-09T21:35:22Z",
  "tools": [
    {
      "name": "7-Zip",
      "version": "25.01"
    },
    {
      "name": "avifenc",
      "version": "1.2.1"
    }
  ],
  "user_ini": {
    "lines": [],
    "path": "htdocs/.user.ini"
  }
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use), or your company requires two-factor authentication and you have not set it up. For routes outside Managed Clusters.

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 The id does not exist or is something you cannot see, or the feature is not on for your company (`feature_off`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 409 The site is not on the runtime yet (`runtime_not_adopted`), is not running (`not_running`), another command or change is running on it (`busy`), an earlier command has not been confirmed stopped (`exec_unresolved`), or the site is managed by another control panel (`managed_elsewhere`).

```json
{
  "code": "not_running",
  "message": "The site is not running",
  "reason": "not_running"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

### 502 PHP's answer could not be read from the site (`upstream_unavailable`). Try again in a moment.

```json
{
  "code": "upstream_unavailable",
  "message": "PHP's configuration could not be read from the pod. Try again in a moment.",
  "reason": "upstream_unavailable"
}
```

### 503 The read runs a command on the site, and Corefinity has switched commands on sites off for the moment (`switched_off`), the site's cluster could not be reached (`connect_failed`), or the site's files could not be read (`temporarily_unavailable`). Try again later.

```json
{
  "code": "connect_failed",
  "message": "The cluster could not be reached",
  "reason": "connect_failed"
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 403 | `two_factor_required` | Turn on two-factor on your account, then send again. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 409 | `not_running` | The site, environment or deployment is not running. Read the message: where it can be started or will recover, start it or wait, then try again. |
| 409 | `runtime_not_adopted` | This environment does not run the runtime component yet, so its effective PHP configuration cannot be read. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |
| 502 | `upstream_unavailable` | A service the action depends on did not answer. Try again later. |
| 503 | `connect_failed` | The cluster could not be reached. |
| 503 | `temporarily_unavailable` | The Control Panel could not answer just now. Nothing was started; try again shortly. |
| 503 | `switched_off` | Corefinity has switched this action off for the moment. Try again later. |

## The same task elsewhere

- Guide: [PHP configuration](https://docs.corefinity.com/guides/sites/software-and-services/php-settings-and-php-ini.md)
- MCP tool: [`corestack_php_effective_get`](https://docs.corefinity.com/mcp/tools/corestack_php_effective_get.md)
