• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Forwarded to devs php_handler --reread not updating default value after php.ini is updated

nethubonline

Regular Pleskian
Username: nethubonline

TITLE

php_handler --reread not updating default value after php.ini is updated

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

CentOS Linux 7.9.2009, Plesk Obsidian 18.0.36

PROBLEM DESCRIPTION

After update php.ini (e.g. /opt/plesk/php/7.4/etc/php.ini), php_handler --reread doesn't update default value in Plesk

STEPS TO REPRODUCE

  1. fresh install Plesk

  2. echo '
    PHP:
    settings.performance.post_max_size.values[]=123M
    settings.performance.post_max_size.values[]=234M
    settings.performance.post_max_size.values[]=345M
    settings.performance.post_max_size.custom=false' > /usr/local/psa/admin/conf/panel.ini
    
    
    [*]sed -i 's/^post_max_size = .*$/post_max_size = 123M/g' /opt/plesk/php/7.4/etc/php.ini
    
    
    [*]plesk bin php_handler --reread
    
    
    [*]plesk bin customer --create abc.com -name abc.com -passwd P@ssw0rd1234
    
    
    [*]plesk bin subscription --create abc.com -owner abc.com -service-plan "Default Domain" -ip 1.2.3.4 -login abc -passwd P@ssw0rd1234
    [/LIST]
    
    [B]ACTUAL RESULT[/B] 
    
    Login Plesk > Subscriptions > abc.com > PHP Settings > "post_max_size" is [B]123M [COLOR=rgb(44, 130, 201)]Reset To Default[/COLOR][/B] ([URL='https://i.ibb.co/6wXdKRJ/screenshot-2918.jpg']Screenshot[/URL])
    
    After I click "Reset To Default", it shows blank as [URL='https://i.ibb.co/CzGvCS9/screenshot-2919.jpg']screenshot[/URL]
    
    [B]EXPECTED RESULT[/B] 
    
    Login Plesk > Subscriptions > abc.com > PHP Settings > "post_max_size" is [B]123M (Default)[/B] ([URL='https://i.ibb.co/LQhmZL2/screenshot-2922.jpg']Screenshot[/URL])
    
    [B]ANY ADDITIONAL INFORMATION[/B] 
    
    This problem is similar as [URL='https://talk.plesk.com/threads/php_handler-reread-fails-to-find-new-modules.360248/']php_handler --reread fails to find new modules[/URL] , after one save of PHP settings, and then run [B]plesk bin php_handler --reread[/B] again , then problem is gone
    
    Also, I can see the post_max_size is effect while I run [B]/opt/plesk/php/7.4/bin/php -i|grep -i post_max_size[/B] , so the problem is only on Plesk GUI.
    
    [B]YOUR EXPECTATIONS FROM PLESK SERVICE TEAM[/B] 
    
    Confirm bug
 
Oh, my post above corrupted, I re-write it here:

TITLE

php_handler --reread not updating default value after php.ini is updated

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

CentOS Linux 7.9.2009, Plesk Obsidian 18.0.36

PROBLEM DESCRIPTION

After update php.ini (e.g. /opt/plesk/php/7.4/etc/php.ini), php_handler --reread doesn't update default value in Plesk

STEPS TO REPRODUCE

1. fresh install Plesk
2.
Code:
echo '[php]
settings.performance.post_max_size.values[]=123M
settings.performance.post_max_size.values[]=234M
settings.performance.post_max_size.values[]=345M
settings.performance.post_max_size.custom=false' > /usr/local/psa/admin/conf/panel.ini

sed -i 's/^post_max_size = .*$/post_max_size = 123M/g' /opt/plesk/php/7.4/etc/php.ini
plesk bin php_handler --reread


plesk bin customer --create abc.com -name abc.com -passwd AFD57ijuAFD57iju
plesk bin subscription --create abc.com -owner abc.com -service-plan "Default Domain" -ip 203.194.199.91 -login abc2 -passwd AFD57ijuAFD57iju

ACTUAL RESULT

Login Plesk > Subscriptions > abc.com > PHP Settings > "post_max_size" is 123M Reset To Default (Screenshot)

After I click "Reset To Default", it shows blank as screenshot

EXPECTED RESULT

Login Plesk > Subscriptions > abc.com > PHP Settings > "post_max_size" is 123M (Default) (Screenshot)

ANY ADDITIONAL INFORMATION

This problem is similar as php_handler --reread fails to find new modules , after one save of PHP settings, and then run plesk bin php_handler --reread again , then problem is gone

Also, I can see the post_max_size is effect while I run /opt/plesk/php/7.4/bin/php -i|grep -i post_max_size , so the problem is only on Plesk GUI.

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
To get the Expected Result, you have to configure the options as follows:

Screenshot 11.png

This is explained in the documentation: Customizing PHP Parameters
It is possible that the desired default value for a PHP parameter may not be included in the default list of predefined values. In this case, you need to create a custom list of predefined values first.
The contrary also applies. If you have a custom list of predefined values, that does not include the default "default" value (in this case, "8M"), you need to set a "default" value that is included in the said custom list.[/php]
 
Last edited:
Back
Top