Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MultiPHP INI Editor Values Not Saved for PHP-FPM Sites

Discussion in 'EasyApache' started by linux4me2, Aug 26, 2017.

  1. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    168
    Likes Received:
    36
    Trophy Points:
    28
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    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..
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,165
    Likes Received:
    1,371
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    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

    Please note the following entry in the cPanel 66 Release Notes:

    Thank you.
     
    linux4me2 likes this.
  3. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    168
    Likes Received:
    36
    Trophy Points:
    28
    Location:
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,165
    Likes Received:
    1,371
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    linux4me2 likes this.
Loading...

Share This Page