- Created by Documentation, last modified on Oct 05, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function sets a PHP version's handler.
Important:
WebServer
role, the system disables this function. For more information, read our How to Use Server Profiles documentation.Examples
https://hostname.example.com:2087/cpsess##########/json-api/php_set_handler?api.version=1&version=ea-php70&handler=suphp
https://hostname.example.com:2087/cpsess##########/xml-api/php_set_handler?api.version=1&version=ea-php70&handler=suphp
whmapi1 php_set_handler version=ea-php70 handler=suphp
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 1 documentation or run the
whmapi1 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi1
command:/usr/local/cpanel/bin/whmapi1
{ "data":{ }, "metadata":{ "version":1, "reason":"OK", "result":"1", "command":"php_set_handler" } }
<result> <data/> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>php_set_handler</command> </metadata> </result>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
| string | Required An installed PHP version. |
| ea-php70
|
handler | string | Required An installed PHP handler. |
| suphp |
Returns
This function returns only metadata.
Function information
API Version:
Available in:
WHM 54+
Methods:
GET, POST
Required Parameters:
version
, handler
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Sections - PHP — PHP functions allow you to manage your system's PHP configuration.
-
Page:WHM API 1 Functions - php_get_installed_versions — This function returns the installed PHP versions on a server.
-
Page:WHM API 1 Functions - php_get_system_default_version — This function returns the system default PHP version.
-
Page:WHM API 1 Functions - php_get_vhost_versions — This function returns the PHP version of every virtual host on the system.
-
Page:WHM API 1 Functions - php_set_old_fpm_flag — This function determines whether your system runs with a preconfigured PHP-FPM configuration.