Update PHP version's php.ini file

This function changes the contents of a PHP version's php.ini file.

Notes:

  • This document only applies to systems that run EasyApache 4.
  • Due to the limited field length of HTTP GET method calls, we strongly recommend that you use the HTTP POST method.

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

SecurityBasicAuth
Request
query Parameters
content
required
string

The contents of the php.ini file that you wish to change.

Example: content=[PHP] ; About php.ini ; php.ini is responsible for configuring many of the aspects of PHP's behavior. pcre.backtrack_limit=100000
version
required
string

The version of PHP for which you wish to change the php.ini file.

  • ea-php72
  • ea-php73
  • ea-php74
  • Any custom PHP package name
Example: version=ea-php74
Responses
200

HTTP Request was successful.

Response Schema: application/json
data
object
object
post/php_ini_set_content
Request samples
whmapi1 --output=jsonpretty \
  php_ini_set_content \
  content=$'[PHP]
; About php.ini
; php.ini is responsible for configuring many of the aspects of PHP\'s behavior.
pcre.backtrack_limit=100000
' \
  version='ea-php74'
Response samples
application/json
{
  • "data": { },
  • "metadata": {
    • "command": "php_ini_set_content",
    • "reason": "Ok",
    • "result": 1,
    • "version": 1
    }
}