# PHP Settings

Web Server Management / PHP Settings

## Return PHP version's handler

 - [GET /LangPHP/php_get_domain_handler](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_get_domain_handler.md): This function returns a PHP version's assigned PHP handler.

Note:

  This document only applies to systems that run EasyApache 4.

Important:

  When you disable the WebServer role, the system disables this function. For more information, read our How to Use Server Profiles documentation.

## Return domains that shared PHP configuration

 - [GET /LangPHP/php_get_impacted_domains](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_get_impacted_domains.md): This function lists domains that obtain their PHP version from a specified PHP configuration.

Note:

  This document only applies to systems that run EasyApache 4.

Important:

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

## Return installed PHP versions

 - [GET /LangPHP/php_get_installed_versions](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_get_installed_versions.md): This function lists the system's PHP versions.

Note:

  This document only applies to systems that run EasyApache 4.

Important:

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

## Return default PHP version

 - [GET /LangPHP/php_get_system_default_version](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_get_system_default_version.md): This function lists the system’s default PHP version.

Important:

  When you disable the Web Server role, the system disables this function.

## Return virtual host's PHP version

 - [GET /LangPHP/php_get_vhost_versions](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_get_vhost_versions.md): This function returns the PHP version of every virtual host that a reseller controls.

You can get the version of a single virtual host by providing an optional vhost name.

Note:

  This document only applies to systems that run EasyApache 4.

Important:

  When you disable the Web Server role, the system disables this function.

## Return basic PHP directives

 - [GET /LangPHP/php_ini_get_user_basic_directives](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_ini_get_user_basic_directives.md): 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.

## Return virtual host's php.ini content

 - [GET /LangPHP/php_ini_get_user_content](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_ini_get_user_content.md): This function returns the contents of a virtual host's php.ini file.

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.

## Return php.ini file paths

 - [GET /LangPHP/php_ini_get_user_paths](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_ini_get_user_paths.md): This function lists the php.ini file paths for the user's home directory and virtual host document roots.

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.

## Update basic PHP directives

 - [GET /LangPHP/php_ini_set_user_basic_directives](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_ini_set_user_basic_directives.md): This function sets the values of any basic PHP directive. The Basic Mode section of cPanel's
MultiPHP INI Editor interface (WHM >> Home >> Software >> MultiPHP INI Editor) lists these directives.

Note:

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

Important:

  When you disable the Web Server role, the system disables this function.

## Update virtual host's php.ini content

 - [GET /LangPHP/php_ini_set_user_content](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_ini_set_user_content.md): This function changes the contents of a virtual host's php.ini file.

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.

## Update virtual host's PHP version

 - [GET /LangPHP/php_set_vhost_versions](https://api.docs.cpanel.net/specifications/cpanel.openapi/php-settings/php_set_vhost_versions.md): This function sets a virtual host's PHP version.

Note:

  This document only applies to systems that run EasyApache 4.

Important:

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

