For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get PHP details

Returns the full PHP configuration for the website: current version, available versions (supported and unsupported), enabled/disabled extensions, options with their current value, default, type and…

Get PHP details

get

Returns the full PHP configuration for the website: current version, available versions (supported and unsupported), enabled/disabled extensions, options with their current value, default, type and the plan limit (max), and conflicting extension groups.

Use it to check the current PHP setup before updating the version, extensions or options.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
usernamestringRequiredExample: u123456789
domainstringRequired

Domain name

Example: mydomain.tld
Responses
200

Success response

application/json
php_versionstringOptional

Current PHP version name

Example: 8.1
php_version_fullstringOptional

Full PHP version name

Example: 8.1.27
extensionsobjectOptional

PHP extensions keyed by extension name

Example: {"yaml":{"state":"enabled","description":""}}
get/api/hosting/v1/accounts/{username}/websites/{domain}/php/details
GET /api/hosting/v1/accounts/{username}/websites/{domain}/php/details HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "php_version": "8.1",
  "php_version_full": "8.1.27",
  "php_versions": {
    "supported": {
      "8.1": "PHP 8.1"
    },
    "unsupported": {
      "5.2": "PHP 5.2"
    }
  },
  "options": {
    "ANY_ADDITIONAL_PROPERTY": {
      "type": "bool",
      "value": "On",
      "comment": "Allows PHP file functions to retrieve data from remote locations",
      "default": "On",
      "range": "8M-512M",
      "max": "512M"
    }
  },
  "extensions": {
    "yaml": {
      "state": "enabled",
      "description": ""
    }
  },
  "conflicting_extensions": [
    [
      "apc",
      "opcache"
    ]
  ]
}

Last updated

Was this helpful?