- Created by Documentation, last modified on Aug 12, 2019
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
block_incoming_email_from_country
block_incoming_email_from_domain
expunge_messages_for_mailbox_guid
get_unique_recipient_count_per_sender_for_user
get_unique_sender_recipient_count_per_user
get_user_email_forward_destination
list_blocked_incoming_email_countries
list_blocked_incoming_email_domains
set_user_email_forward_destination
unblock_incoming_email_from_country
unblock_incoming_email_from_domain
Description
This function allows WHM's MultiPHP Manager interface (Home >> Software >> MultiPHP Manager) to change the values of a domain.
Important:
WebServer
role, the system disables this function. For more information, read our How to Use Server Profiles documentation.Warning:
We strongly recommend that you only activate Apache PHP-FPM if your server has at least 2 GB of RAM available, or at least 30 MB of RAM per domain. If you enable PHP-FPM on a server with less than the required RAM, your server may experience severe performance issues.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/php_set_vhost_versions?api.version=1&version=ea-php55&vhost-0=rm5.tld
https://hostname.example.com:2087/cpsess##########/xml-api/php_set_vhost_versions?api.version=1&version=ea-php55&vhost-0=rm5.tld
whmapi1 php_set_vhost_versions version=ea-php55 vhost-0=rm5.tld
whmapi1 php_set_vhost_versions vhost-0=rm5.tld php_fpm_pool_parms='{"pm_max_children":15,"pm_process_idle_timeout":100,"pm_max_requests":200}' php_fpm=1 version=ea-php56
Notes:
- Unless otherwise noted, 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
{ "metadata":{ "reason":"OK", "result":1, "command":"php_set_vhost_versions", "version":1 }, "data":{ } }
<result> <metadata> <reason>OK</reason> <result>1</result> <command>php_set_vhost_versions</command> <version>1</version> </metadata> <data/> </result>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
php_fpm_pool_parms | JSON | A JSON string that encodes a hash of values. Note: We introduced this parameter in cPanel & WHM version 60. | A valid JSON string that contains the | |
| integer | The maximum number of child pages per pool. This parameter defaults to Note: You must supply this value in the | A valid child value. | 5 |
| integer | A specified time of idleness before the system kills an FPM child page. This parameter defaults to Note: You must supply this value in the | A valid timeout value. | 10 |
| integer | The maximum number of requests per pool. This parameter defaults to Note: You must supply this value in the | A valid request value. | 20 |
php_fpm | Boolean | Whether PHP-FPM is enabled. This parameter defaults to |
| 1 |
| string | Required The virtual host's PHP version. |
| ea-php70 |
| string | Required The virtual host's name. | A valid hostname. | otherchars.rm3.tld |
Returns
This function only returns metadata.
Function information
API Version:
Available in:
WHM 60+
Methods:
GET, POST
Required Parameters:
vhost-0
, version
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 0 Functions - setresellermainip — This function assigns a main IP address to a reseller's account.
-
Page:WHM API 0 Functions - setresellernameservers — This function assigns nameservers to a reseller's account.
-
Page:WHM API 1 Sections - Accounts — Account functions allow you to manage cPanel accounts, WHM accounts, and their settings.
-
Page:WHM API 1 Functions - accountsummary — This function retrieves a summary of a user's account.
-
Page:WHM API 1 Functions - domainuserdata — This function retrieves domain data.