• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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