After applying a change in the cPanel MultiPHP INI Editor, the values aren't reflected on the websites.
When using LiteSpeed Web Server, it will restrict users' ability to set PHP ini file values for some options that require PHP mode "PHP_INI_SYSTEM". So when applying changes in cPanel for PHP ini file settings, they won't be reflected. LiteSpeed will assume the control of the PHP handler when in use. This overall impacts the standard functionality of the cPanel software because a change is applied in the interface but not applied to the PHP settings of the accounts. The main reason why this occurs is that PHP has configuration modes. These configuration modes control where an option can be defined. You can find more details about PHP modes in the below PHP documentation resources.
Note: The below steps should be performed by a certified administrator to avoid conflicts or service failures. It is also important to take note of which PHP versions you want to customize as this is required throughout the process of adding or editing handlers in LiteSpeed. The steps can be repeated for each PHP version you want to automatically load php.ini file values from public_html.
In the LiteSpeed Web Server console, adjust the PHP configuration options.
1. Log in to WHM
2. Navigate to LiteSpeed
3. Under "Manage LiteSpeed Web Server," click "LiteSpeed Configuration."
4. Click WebAdmin Console
4. Login using the LiteSpeed admin credentials
5. In the LiteSpeed WebAdmin console, click "Configuration."
6. Navigate to the tab called "External App."
7. Click "Add" to the right of "External Applications", if the PHP version is not already listed. If the PHP is listed, click "Edit" under "Actions" instead of "Add".
8. Clicking add opens the interface to add custom PHP options for LiteSpeed. The LiteSpeed document contains additional details about how to configure this section.
For the purposes of demonstration, PHP 7.0 options have been filled in using the below information.
Max Connections: 35
Initial Request Timeout (secs): 60
Retry Timeout (secs): 0
Persistent Connection: Yes
Response Buffering: No
Start By Server: Yes (Through CGI Daemon Async)
Back Log: 100
Run On Startup: Yes (Detached)
Max Idle Time: 10
Memory Soft Limit (bytes): 2047
Memory Hard Limit (bytes): 2048
Process Soft Limit: 400
Process Hard Limit: 500
Note: If the PHP versions are already defined in the "External Apps" list, you need to click Edit from this step and add the below Environment setting.
As demonstrated in the screenshot below:
9. Click Save, then click the "Script Handler" tab.
10. This tab opens up the options to either Add or Edit existing PHP handlers. Following the previous example to app PHP 7.0 in this section, we will add the handler for PHP 7.0 and link it to the PHP options list. If the PHP versions are already defined in the list, no need to perform any changes as you are all set. If PHP versions are not defined, then you need to add one. To demonstrate, I've listed the options to set when adding the new handler for PHP 7.0
Handler Type: LiteSpeed
Handler Name: Select the dropdown option for "lsphp70"
( The dropdown will list PHP version created in step 7 and 8. )
11. Click Save
12. Perform a graceful restart. The confirmation of the configuration being modified also includes a graceful restart link.
13. You should be all set. PHP ini file values defined in public_html/php.ini will now load when making changes.
It is also possible to configure ini files on a domain or case-by-case basis. You can find more details in the below LiteSpeed documentation page.