• 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

Forwarded to devs Subscriptions become locked for sync if PHP settings are changed

nethubonline

Regular Pleskian
User name: nethubonline

TITLE

Subscriptions become locked for sync if PHP settings are changed

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

CentOS Linux release 7.3.1611, Plesk, Onyx 17.8.11 Update #83 & Plesk Obsidian 18.0.24 Update #83

PROBLEM DESCRIPTION

I found this URL [FIXED BUG] Subscriptions become locked for sync if PHP settings are changed about the problem has been fixed in new update, but I checked it is not fixed completely.

Problem still exists on Plesk 17.8 & Plesk 18 , but some little different results.

Secondly change service plan would raise another problem.

STEPS TO REPRODUCE

  1. fresh install Plesk
  2. plesk bin customer --create example.com -name example.com -passwd Testing1234 -email [email protected]
  3. plesk bin subscription --create example.com -owner example.com -service-plan "Default Domain" -ip 1.2.3.4 -login test -passwd Testing1234

Login as "Customer" > Websites & Domains > PHP Settings
ActionPlesk 17.8Plesk 18
Change "PHP version" (don't touch "run PHP as")SyncedSynced
Change "run PHP as" (don't touch "PHP version")LockedSynced

Login as "admin" > Subscriptions > example.com > PHP Settings
ActionPlesk 17.8Plesk 18
Change "PHP version" (don't touch "run PHP as")LockedSynced
Change "run PHP as" (don't touch "PHP version")LockedSynced
Change "memory_limit"LockedLocked
Change "Additional configuration directives"SyncedSynced

By command line
ActionPlesk 17.8Plesk 18
plesk bin subscription -u example.com -php_handler_id plesk-php72-fpmSyncedSynced
plesk bin subscription -u example.com -php_handler_id plesk-php73-fastcgiSyncedSynced
echo 'memory_limit = 123M' > /tmp/php.txt; plesk bin subscription --update-php-settings example.com -settings /tmp/php.txtSyncedSynced
echo 'register_long_arrays = On' > /tmp/php.txt; plesk bin subscription --update-php-settings example.com -additional-settings /tmp/php.txtSyncedSynced


Change service plan would raise another problem, I will show you to clear everything and start again:
  1. plesk bin subscription --unlock-subscription example.com
  2. plesk bin subscription --sync-subscription example.com
  3. echo 'memory_limit = 123M' > /tmp/php.txt; plesk bin subscription --update-php-settings example.com -settings /tmp/php.txt
  4. echo 'register_long_arrays = On' > /tmp/php.txt; plesk bin subscription --update-php-settings example.com -additional-settings /tmp/php.txt

  5. plesk bin subscription --switch-subscription example.com -service-plan "Unlimited"

    Result: Synced, "memory_limit = 123M" still exists but "register_long_arrays = On" disappeared and ineffective

  6. plesk bin subscription --switch-subscription example.com -service-plan "Default Domain"

    Result: Synced, but "memory_limit = 123M" and "register_long_arrays = On" disappeared

ACTUAL RESULT

  • Customer/admin make changes to PHP settings will lock subscription
  • Command line make changes to PHP settings do not lock subscription
  • Change service plan for a subscription will clear some/all PHP Settings

EXPECTED RESULT

  • Subscription should be syncd no matter how customer/admin make changes to PHP settings
  • Change service plan for a subscription should keep all PHP Settings if the subscription is in syncd status

ANY ADDITIONAL INFORMATION



YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
From developer:

Subscription should get locked upon memory_limit change if permission "Hosting performance settings management" is not granted (and it is not by default) to prevent custom value being overwritten. Bug PPPM-11740 is confirmed regarding subscription not being locked while changing memory_limit via CLI.

As for additional PHP settings, it is expected that they are overwritten during synchronization with the plan, see PHP Settings
 
Thanks IgorG,

Oh, if changing memory_limit via CLI should get locked status, then it make sense.

I understand about "the added directives and other changes in PHP settings can be lost when the subscription is synchronized with the service plan" , however I wonder why setting "additional PHP directives" does not get the Locked status? Do you think it is better to lock it?

Since the subscription is synced, I may not know there is setting in Additional configuration directives, if I change its plan, website may be down because missing the PHP parameters.
 
Back
Top