Description
This function retrieves PHP directive configuration information.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
dirlist |
string |
Required The list of directives to query. Note: This function will not fail if you do not include thedirlistparameter. However, adirlist value is required in order to return configuration information. |
One or more php.ini directives. Notes:
|
engine|short_open_tag|output_buffering |
getnull |
Boolean |
Whether to include null values in the return data. This parameter defaults to 0. |
|
1 |
php_prefix |
string |
The PHP installation location to query. |
Note: In WHM API calls, replace each forward slash character with %2F. |
/usr/local/cpanel/3rdparty/ |
Returns
Return |
Type |
Description |
Possible values |
Example |
info |
string |
Information from thephp.ini file about the directive, if it exists. |
A valid string. |
Enable the PHP scripting language engine under Apache. |
dirvalue |
string |
The directive's current option. |
A valid string. |
On |
commented |
Boolean |
Whether the directive is disabled (commented out) in the php.ini file. |
|
0 |
subsection |
string |
The php.ini file subsection that contains the directive. |
A valid string. |
Language Options |
directive |
string |
The PHP directive. |
A PHP directive that you included in thedirlist input parameter. |
engine |
section |
string |
The php.ini file section. |
A valid string. |
PHP |
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |