MultiPHP INI Editor Values Not Saved for PHP-FPM Sites

linux4me2

Well-Known Member
Aug 21, 2015
259
78
78
USA
cPanel Access Level
Root Administrator
Hello,

Internal case CPANEL-11563 is open to address an issue where cPanel MultiPHP INI Editor changes do not reflect within PHP-FPM. I'll update this thread with more information on the status of this case as it becomes available. Additionally, there's another thread you may find helpful at:

Enabling PHP-FPM in MultiPHP Manager

Thank you.
I realize the above is from an old post, but I ran into the problem of changes in WHM 66 MultiPHP INI Editor not being reflected for sites running PHP-FPM, and I'm wondering if there is any update on this, or if I'm experiencing a different issue.

Specifically, when I changed upload_max_filesize, my change is saved in the MultiPHP INI Editor for PHP 7, and shows in /opt/cpanel/ea-php70/root/etc/php.ini, but wasn't reflected on a PHPINFO test page on a PHP-FPM site, which still showed the old value. A non-PHP-FPM site running the same version of PHP did show the correct, updated value of upload_max_filesize.

I also noticed that the file /opt/cpanel/ea-php70/root/etc/php.d/local.ini didn't include the change I made to upload_max_filesize, but still showed the old value. The file date hadn't updated to reflect the updated file, either. None of the sites is using a .user.ini.

A PHPINFO test page on the target site still showed the old value for upload_max_filesize. I manually edited the upload_max_filesize in the local.ini, then I turned PHP-FPM off and back on, after which the target site showed the correct upload_max_filesize value, so I've got what appears to be a workaround, but I'd like to know if I have some other issue, or it's still CPANEL-11563..
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello,

Specifically, when I changed upload_max_filesize, my change is saved in the MultiPHP INI Editor for PHP 7, and shows in /opt/cpanel/ea-php70/root/etc/php.ini, but wasn't reflected on a PHPINFO test page on a PHP-FPM site, which still showed the old value. A non-PHP-FPM site running the same version of PHP did show the correct, updated value of upload_max_filesize.
It's not currently possible to modify the PHP configuration values for domain names assigned the PHP-FPM handler by using the MultiPHP INI Editor. Instead, you'd need to follow the instructions referenced on the following post:

Enabling PHP-FPM in MultiPHP Manager

I also noticed that the file /opt/cpanel/ea-php70/root/etc/php.d/local.ini didn't include the change I made to upload_max_filesize, but still showed the old value. The file date hadn't updated to reflect the updated file, either. None of the sites is using a .user.ini.
Please note the following entry in the cPanel 66 Release Notes:

We removed the use of local.ini files in EasyApache 4. WHM's MultiPHP INI Editor interface (Home >> Software >> MultiPHP INI Editor) now saves changes to the php.ini file rather than the local.ini file.
Thank you.
 
  • Like
Reactions: linux4me2

linux4me2

Well-Known Member
Aug 21, 2015
259
78
78
USA
cPanel Access Level
Root Administrator
Thank you, Michael.

So, I must have stumbled on a workaround. I can turn PHP-FPM off, then back on, and my change to upload_max_filesize in the MultiPHP INI Editor was then used by the site using PHP-FPM.

The recommended workaround is to edit:
Code:
/var/cpanel/userdata/[user]/[domain].php-fpm.yaml
and put in:
Code:
php_value_upload_max_filesize: { name: 'php_value[upload_max_filesize]', value: 5M }
then run:
Code:
/scripts/php_fpm_config --rebuild --domain=[domain]
I just have one question. The documentation at Configuration Values of PHP-FPM wasn't clear on one point. Since the value I'm trying to pass, "5M," is a string, does it need to be in single quotes? The example in the docs wasn't a string.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
I just have one question. The documentation at Configuration Values of PHP-FPM wasn't clear on one point. Since the value I'm trying to pass, "5M," is a string, does it need to be in single quotes? The example in the docs wasn't a string.
Hello,

No, you would not quote the value. Here's an example:

Code:
php_admin_value_ldap_max_links: { name: 'php_admin_value[ldap.max_links]', value: -1 }
Thank you.
 
  • Like
Reactions: linux4me2