< All Topics

tool/getphpini

Description

Lists the php.ini data for an existing domain from a given SPanel user account.

Parameters

FieldTypeRequiredDescription
tokenstringYesAuthorizing API token – check API Basics for more information.
accountuserstringYesThe SPanel user account that is being managed or viewed.
actionstringYesThe category and function being executed.
domainstringNoThe domain to get the php.ini data for. If omitted, the API call will return the first domain’s php.ini.

Example

$endpointUrl = 'https://123.123.123.123/spanel/api.php';

$postData = [
  'token' => 'provided_auth_token',
  'accountuser' => 'spanelio',
  'action' => 'tool/getphpini',
  'domain' => 'spanel.io'
];

$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $endpointUrl);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt( $ch, CURLOPT_POST, true);
curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query($postData));
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false);
$jsonOutput = curl_exec( $ch );

You can find more information about the Endpoint URL in our API Basics article.

Output

{
    "result": "success",
    "data": {
        "basic": {
            "allow_url_fopen": {
                "type": "bool",
                "setting": 1
            },
            "display_errors": {
                "type": "string",
                "setting": "STDERR",
                "options": [
                    "STDERR",
                    "STDOUT"
                ]
            },
            "max_execution_time": {
                "type": "int",
                "setting": "0"
            },
            "max_input_time": {
                "type": "int",
                "setting": "-1"
            },
            "max_input_vars": {
                "type": "int",
                "setting": "1000"
            },
            "memory_limit": {
                "type": "int",
                "setting": "512M"
            },
            "post_max_size": {
                "type": "int",
                "setting": "2000M"
            },
            "upload_max_filesize": {
                "type": "int",
                "setting": "200M"
            }
        },
        "advanced": "allow_url_fopen = 1\ndisplay_errors = STDERR\nmax_execution_time = 0\nmax_input_time = -1\nmax_input_vars = 1000\nmemory_limit = 512M\npost_max_size = 2000M\nupload_max_filesize = 200M"
    }
}
Previous tool/deletecsr
Next tool/setphpini
Table of Contents