# cPanel API 2 Functions - PHPINI::getalloptions

Warning:
The cPanel API 2 system is deprecated. We **strongly** recommend that you use [UAPI](/cpanel/introduction) instead of cPanel API 2.

## Description

This function retrieves a PHP configuration file's list of options.

Warning:
We **strongly** recommend that you use [UAPI](/cpanel/introduction/) instead of cPanel API 2. However, no equivalent UAPI function exists.

Important:
When you disable the [*Web Server* role](https://docs.cpanel.net/knowledge-base/general-systems-administration/how-to-use-server-profiles/#roles), the system **disables** this function.

## Examples

WHM API (JSON)


```undefined syntaxhighlighter-pre
https://hostname.example.com:2087/cpsess###########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=PHPINI&cpanel_jsonapi_func=getalloptions&php_prefix="%2Fusr%2Flocal%2Fcpanel%2F3rdparty%2F"
```

Note:
For more information, read our [Calls from the WHM API](/whm/use-whm-api-to-call-cpanel-api-and-uapi) documentation.

LiveAPI PHP Class


```undefined syntaxhighlighter-pre
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.

// Get PHP configuration info.
$get_php_config = $cpanel->api2(
    'PHPINI', 'getalloptions',
    array(
        'php_prefix'    => '/usr/local/cpanel/3rdparty/',
    )
);
```

Note:
For more information, read our [Guide to the LiveAPI System](/guides/guide-to-the-liveapi-system/#guide-to-the-liveapi-system).

LiveAPI Perl Module


```undefined syntaxhighlighter-pre
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.

# Get PHP configuration info.
my $get_php_config = $cpliveapi->api2(
    'PHPINI', 'getalloptions',
    {
        'php_prefix'    => '/usr/local/cpanel/3rdparty/',
    }
);
```

Note:
For more information, read our [Guide to the LiveAPI System](/guides/guide-to-the-liveapi-system/#guide-to-the-liveapi-system).

cPanel Tag System (deprecated)

Warnings:
- cPanel tags are **deprecated**. We **strongly** recommend that you **only** use the [LiveAPI](/guides/guide-to-the-liveapi-system) system to call the cPanel APIs. Examples are **only** present in order to help developers move from the old cPanel tag system to our [LiveAPI](/guides/guide-to-the-liveapi-system).
- cPanel API 2 calls that use cPanel tags vary in code syntax and in their output.
- For more information, read our [Deprecated cPanel Tag Usage](/cpanel-api-2/cpanel-api-2-deprecate-cpanel-tag-usage/) documentation.


Command Line


```undefined syntaxhighlighter-pre
cpapi2 --user=username PHPINI getalloptions
```

div
Notes:

- You **must** URI-encode values.
- `username` represents your account-level username.
- You **must** include the `--user=username` option.
- For more information and additional output options, read our [Guide to cPanel API 2](/cpanel-api-2/) documentation or run the `cpapi2 --help` command.
- If you run CloudLinux™, you **must** use the full path of the `cpapi2` command:

```undefined syntaxhighlighter-pre
/usr/local/cpanel/bin/cpapi2
```


br
Output (JSON)


```undefined syntaxhighlighter-pre
{
  "cpanelresult": {
    "apiversion": 2,
    "func": "getalloptions",
    "data": [
      {
        "dirlist": [
          {
            "info": "User-function to be called if an assertion fails.",
            "value": "0",
            "commented": 1,
            "subsection": "main",
            "directive": "assert.callback",
            "section": "Assertion"
          },
          {
            "info": "Issue a PHP warning for each failed assertion.",
            "value": "On",
            "commented": 1,
            "subsection": "main",
            "directive": "assert.warning",
            "section": "Assertion"
          },
          {
            "info": "Eval the expression with current error_reporting().  Set to true if you want\n error_reporting(0) around the eval().",
            "value": "0",
            "commented": 1,
            "subsection": "main",
            "directive": "assert.quiet_eval",
            "section": "Assertion"
          },
          {
            "info": "Assert(expr); active by default.",
            "value": "On",
            "commented": 1,
            "subsection": "main",
            "directive": "assert.active",
            "section": "Assertion"
          },
          {
            "info": "Don't bail out by default.",
            "value": "Off",
            "commented": 1,
            "subsection": "main",
            "directive": "assert.bail",
            "section": "Assertion"
          }
        ],
        "section": "Assertion"
      },
      {
        "dirlist": [
          {
            "info": "Modify the setting below to match the directory location of the cracklib\n dictionary files.  Include the base filename, but not the file extension.",
            "value": "c:\\php\\lib\\cracklib_dict",
            "commented": 1,
            "subsection": "main",
            "directive": "crack.default_dictionary",
            "section": "Crack"
          }
        ],
        "section": "Crack"
      },
      {
        "dirlist": [
          {
            "info": "",
            "value": "128",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.max_results",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.default_database_password",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.default_database",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "On",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.autocommit",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "On",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.allow_persistent",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "128",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.max_connections",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "1000",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.batchSize",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "_SYSTEM",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.default_user",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "128",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.max_links",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.default_password",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "-1",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.max_persistent",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "Off",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.generate_warnings",
            "section": "FrontBase"
          },
          {
            "info": "",
            "value": "",
            "commented": 1,
            "subsection": "main",
            "directive": "fbsql.default_host",
            "section": "FrontBase"
          }
        ],
        "section": "FrontBase"
      },
      {
        "dirlist": [
          {
            "info": "Allow or prevent persistent links.",
            "value": "On",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.allow_persistent",
            "section": "Informix"
          },
          {
            "info": "Trailing blanks are stripped from fixed-length char columns.  May help the\n life of Informix SE users.",
            "value": "0",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.charasvarchar",
            "section": "Informix"
          },
          {
            "info": "Maximum number of links (persistent + non-persistent).  -1 means no limit.",
            "value": "-1",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.max_links",
            "section": "Informix"
          },
          {
            "info": "Default host for ifx_connect() (doesn't apply in safe mode).",
            "value": "",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.default_host",
            "section": "Informix"
          },
          {
            "info": "Default user for ifx_connect() (doesn't apply in safe mode).",
            "value": "",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.default_user",
            "section": "Informix"
          },
          {
            "info": "NULL's are returned as empty strings, unless this is set to 1.  In that case,\n NULL's are returned as string 'NULL'.",
            "value": "0",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.nullformat",
            "section": "Informix"
          },
          {
            "info": "If on, select statements return the contents of a byte blob instead of its id.",
            "value": "0",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.byteasvarchar",
            "section": "Informix"
          },
          {
            "info": "Maximum number of persistent links.  -1 means no limit.",
            "value": "-1",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.max_persistent",
            "section": "Informix"
          },
          {
            "info": "If on, the contents of text and byte blobs are dumped to a file instead of\n keeping them in memory.",
            "value": "0",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.blobinfile",
            "section": "Informix"
          },
          {
            "info": "Default password for ifx_connect() (doesn't apply in safe mode).",
            "value": "",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.default_password",
            "section": "Informix"
          },
          {
            "info": "If on, select statements return the contents of a text blob instead of its id.",
            "value": "0",
            "commented": 0,
            "subsection": "main",
            "directive": "ifx.textasvarchar",
            "section": "Informix"
          }
        ],
        "section": "Informix"
      },
      {
        "dirlist": [
          {
            "info": "Maximum number of links, including persistents.  -1 means no limit.",
            "value": "-1",
            "commented": 0,
            "subsection": "main",
            "directive": "ingres.max_links",
            "section": "Ingres II"
          },
          {
            "info": "Maximum number of persistent links.  -1 means no limit.",
            "value": "-1",
            "commented": 0,
            "subsection": "main",
            "directive": "ingres.max_persistent",
            "section": "Ingres II"
          },
          {
            "info": "Default user.",
            "value": "",
            "commented": 0,
            "subsection": "main",
            "directive": "ingres.default_user",
            "section": "Ingres II"
          },
          {
            "info": "Allow or prevent persistent links.",
            "value": "On",
            "commented": 0,
            "subsection": "main",
            "directive": "ingres.allow_persistent",
            "section": "Ingres II"
          },
          {
            "info": "Default password.",
            "value": "",
            "commented": 0,
            "subsection": "main",
            "directive": "ingres.default_password",
            "section": "Ingres II"
          },
          {
            "info": "Default database (format: [node_id::]dbname[\/srv_class]).",
            "value": "",
            "commented": 0,
            "subsection": "main",
            "directive": "ingres.default_database",
            "section": "Ingres II"
          }
        ],
        "section": "Ingres II"
      }
    ],
    "event": {
      "result": 1
    },
    "module": "PHPINI"
  }
}
```

Note:
Use cPanel's *[API Shell](https://docs.cpanel.net/cpanel/advanced/api-shell-for-cpanel)* interface (*cPanel >> Home >> Advanced >> API Shell*) to directly test cPanel API calls.

## Parameters

table
colgroup
col
col
col
col
col
thead
tr
th
strong
Parameter
th
strong
Type
th
strong
Description
th
strong
Possible values
th
strong
Example
tbody
tr
td
code
php_prefix
td
em
string
td
p
The PHP installation to query.
p
This parameter defaults to 
code
/usr/local/
.
p
td
div
ul
li
code
/usr/local/
li
code
/usr/local/php4/
li
code
/usr/local/cpanel/3rdparty/
p
In WHM API calls, replace each forward slash character with 
code
%2F
.
td
code
/usr/local/cpanel/3rdparty/
## Returns

table
thead
tr
th
strong
Return
th
strong
Type
th
strong
Description
th
strong
Possible values
th
strong
Example
tbody
tr
td
code
info
td
em
string
td
Information from the 
code
php.ini
 file about the directive, if it exists.
td
A valid string.
td
code
Enable the PHP scripting language engine under Apache.
tr
td
code
value
td
em
string
td
The directive's current option.
td
A valid string.
td
code
On
tr
td
code
commented
td
em
Boolean
td
Whether the directive is disabled (commented out) in the 
code
php.ini
 file.
td
ul
li
code
1
 — Commented out.
li
code
0
 — 
strong
Not
 commented out.
td
code
0
tr
td
code
subsection
td
em
string
td
The 
code
php.ini
 file subsection that contains the directive.
td
A 
span
valid 
string.
td
code
Language Options
tr
td
code
directive
td
em
string
td
The PHP directive.
td
A PHP directive that you included in the 
code
dirlist
 input parameter.
td
code
engine
tr
td
code
section
td
em
string
td
The 
code
php.ini
 file section.
td
A 
span
valid 
string.
td
code
PHP
tr
td
code
reason
td
em
string
td
p
A reason for failure.
p
This function only returns a 
code
reason
 value if it failed.
td
p
A string that describes the error.
td
code
This is an error message.
tr
td
code
result
td
em
Boolean
td
p
Whether the function succeeded.
td
ul
li
code
1
 — The function succeeded.
li
code
0
 — The function failed.
td
code
1