This document only applies to systems that run EasyApache 4.
This document explains how to add custom PHP INI directives to your system's PHP configuration. This ensures that you can manage them in the Editor Mode of WHM's MultiPHP INI Editor interface (WHM >> Home >> Software >> MultiPHP INI Editor).
If your system requires extra PHP configuration, you may wish to create custom PHP directives. If you want the system to validate your custom directives, you must add them to the
How to add a custom PHP directive
To add a custom PHP directive, perform the following steps:
- Create the
/etc/cpanel/ea4/phpini_directivesdirectory if it does not already exist.
Inside the directory, create a
.yamlfile that contains a hash of the directives that you wish to add inside the
The hash inside your
directiveskey must use the same format as the
Your file might resemble the following example:
- If your new directive already exists, the system ignores it.
- The system reads the
/usr/local/cpanel/whostmgr/etc/phpini_directives.yamlfile first, and then reads the files in the
/etc/cpanel/ea4/phpini_directivesdirectory in ASCII order. It will use the first occurrence of any directive that it reads from a