Enable or disable PHP functions using the PHP disable_functions directive
Tutorials • cPanel | disable_functions | cpanel | php | functionsThis article will present the necessary steps to enable and disable some PHP functions using the PHP disable_functions directive
by Mihai BobriucViews 1344Updated 1 yearPublished 31/05/2018
Introduction
- PHP uses a lot of functions that can be enabled or disabled using the PHP disable_functions directive. This directive can be edited directly from the cPanel interface. As a safety measure it is recommended to disable all PHP functions that are not used by your application.To disable a PHP function, we'll add it to the list of the disable_functions directive, and to enable it, we'll remove it from the list.
As an example we will disable the mail function ().
Requirement
- To edit disable_functions, we will need the cPanel login data, received in the email with the administration data.
Steps
- First we will login to the cPanel control panel.
- Once we have logged into the control panel, we will go to the Software section and click on Select PHP Version.
- In the next window we will have the possibility to change the PHP version and enable or disable various PHP extensions.
To edit disable_functions, we will click on Switch to PHP Options.
-
The next window will contain a list of existing PHP directives, including disable_functions. Also in this list we will find the directive
suhosin.executor.eval.blacklist. If your application does not use functions that are included in encrypted PHP code, it is recommended to disable all functions in this directive. Activating and deactivating functions from suhosin.executor.eval.blacklist it is done the same as at disable_functions.
- To make changes, we will click on the disable_functions field and add or remove the desired function. In our example we will add the mail() function and click the Apply button.
- After all the desired values have been changed, we will click on the Save button at the bottom of the list. After saving, we will be greeted by a confirmation message: Settings Saved.
- From now on, all functions in the disable_functions directive field will be disabled. In the case of our example, the mail() function will no longer be able to be used in PHP scripts.
Notă :
This tutorial is only valid for shared cPanel accounts.
Similar Articles
14
Creating a mailbox in cPanelTutorials • cPanel | email | cpanel | add
The cPanel panel allows the creation of an unlimited number of email boxes associated with hosted domains. This tutorial will explain the necessary steps to create and access an e-mail box.
by Mihai BobriucViews 2982Updated 1 yearPublished 28/06/2017
5
Enabling Cloudflare services in cPanelTutorials • Cloudflare | cpanel | cloudflare | protection
This article will describe the steps required to enable Cloudflare services for domains hosted on your cPanel control panel
by Mihai BobriucViews 2052Updated 1 yearPublished 26/09/2017
1
Adding an MX record to the cPanel admin panel, redirecting your mail server to GoogleTutorials • Email | mx | mx records | mx registration | dns | email
How to add MX Records and forward mail to the Google mail server
by Mihai BobriucViews 2097Updated 1 yearPublished 21/07/2017
1
Adding an addon domain in cPanelTutorials • cPanel | cpanel | domain | addon
The process of adding an addon domain in cPanel
by Ana RednicViews 1923Updated 2 yearsPublished 31/01/2018
1
Enable DNSSEC in ROTLDTutorials • Domains | dnssec | domain | rotld
This tutorial will describe the steps required to enable DNSSEC on a .ro domain in the ROTLD panel
by Ana RednicViews 1534Updated 2 yearsPublished 25/10/2018