# Return basic PHP directives

This function lists a virtual host's basic PHP directives. The Basic Mode section of cPanel's MultiPHP INI Editor  interface (Home >> Software >> MultiPHP INI Editor) also lists these directives.

Note:

  This document only applies to systems that run EasyApache 4 with MultiPHP enabled.

Important:

  When you disable the WebServer role, the system disables this function.

Endpoint: GET /LangPHP/php_ini_get_user_basic_directives
Version: 11.138.0.6
Security: BasicAuth

## Query parameters:

  - `type` (string, required)
    The type of php.ini file.

- home
- vhost

Important:

 If you set this parameter to vhost, you must also include the vhost parameter.
    Enum: "home", "vhost"

  - `vhost` (string)
    The name of a virtual host.

Important:

 If the type value is vhost, you must use this parameter.
    Example: "clearly.com"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "php_ini_get_user_basic_directives"

  - `module` (string)
    The name of the module called.
    Example: "LangPHP"

  - `result` (object)

  - `result.data` (object)

  - `result.data.directives` (array)
    An array of the available directives in the php.ini file of the selected user's PHP version.

  - `result.data.directives.default_value` (any)
    The directive's default value.
    Example: 1

  - `result.data.directives.info` (string)
    The purpose of the directive.
    Example: "This option enables the URL-aware fopen wrappers that enable accessing URL object like files. Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers."

  - `result.data.directives.key` (string)
    The directive's name.
    Example: "allow_url_fopen"

  - `result.data.directives.php_ini_mode` (string)
    The directive's [PHP_INI mode](http://php.net/manual/en/configuration.changes.modes.php).

* PHP_INI_SYSTEM
* PHP_INI_PERDIR
* PHP_INI_ALL
* PHPINI_ONLY
    Enum: "PHP_INI_SYSTEM", "PHP_INI_PERDIR", "PHP_INI_ALL", "PHPINI_ONLY"

  - `result.data.directives.type` (string)
    The type of value that the directive uses.

* string
* boolean
* integer
* float
    Enum: "string", "boolean", "integer", "float"

  - `result.data.directives.value` (string)
    The directive's current value.
    Example: "On"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    - 1 - Success
- 0 - Failed: Check the errors field for more details.
    Enum: 0, 1

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


