• 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.

Question How to change default PHP settings

nuno.pereira

New Pleskian
Server operating system version
CentOS Linux release 7.9.2009 (Core)
Plesk version and microupdate number
Plesk Obsidian Version 18.0.46
I want to change the default PHP settings on all PHP versions, for the parameters configurable per domain, in particular the disable_functions, as instructed in How to customize PHP settings in Plesk.

I've followed the procedure at Customizing PHP Parameters, in particular adding the following lines

INI:
[php]
settings.performance.disable_functions.default=opcache_get_status,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,mail

For the current domains, if the settings aren't equal to this, then the "Reset to default" is available and after clicking it this new setting is set.

The issue is that for new domains the value is only opcache_get_status.

Is there a way to change the default for new domains?
 
What about defining "disable_functions" in "PHP Settings" of your Service Plan? This setting will be applied to the newly created domain.
If I do that, does it affects the new domains (and subscriptions?) associated with the Service Plan, or just the new domains?
 
It affects all new and existing subscriptions and their domains associated with the service plan.

If you add this under Service Plans and hit the Update & Sync button, it will apply the additional PHP directives to all existing subscriptions and sites under that plan, and all new ones will have them by default too.
  • Locked subscriptions and their domains, new or existing, won't be altered; the change would need to be made on the subscription directly.
  • Syncing any unlocked Subscriptions with their Plan will overwrite the additional PHP directives with whatever's on the plan.

This and more is in the PHP Management Documentation.
 
If I do that, does it affects the new domains (and subscriptions?) associated with the Service Plan, or just the new domains?
Yes, this changed setting will be synchronized to existing subscriptions too.
To prevent this, you can create Add-on Service Plan ("Add an Add-on" button) with this particular disable_functions setting and choose this Service Plan addon when you create new subscriptions. Existing subscriptions will not be affected until you apply this Add-on plan to them.
 
Back
Top