Articles in this section

How to disable PHP functions globally via Plesk

Plesk for Windows kb: how-to Plesk for Linux ABT: Group B

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

How to disable PHP functions globally via Plesk?
E.g. in order to restrict PHP mail() functionality.

Answer

Note: Instructions below are for the default Plesk installation with vanilla PHP. It will not work for the Plesk with CageFS or Alt-PHP.

Disabling PHP functions is possible on a handler level. To achieve this, perform the following:

  1. Log into Plesk and go to Tools & Settings > General Settings > PHP Settings;

  2. Choose PHP handler which settings you wish to modify:
    22.PNG

  3. Switch to tab php.ini and find the directive disable_functions:
    23.PNG

  4. Append to the line functions so it looks like this:

    disable_functions = exec, system, mail

  5. Save the changes by clicking OK.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.