Tutorials • cPanel
Enable or disable PHP functions using the PHP disable_functions directive
This article will present the necessary steps to enable and disable some PHP functions using the PHP disable_functions directive
Views 1401Updated now 2 yearsPublished 31/05/2018by Mihai Bobriuc
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
Creating a mailbox in cPanelTutorials /cPanel
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.
14
by Mihai Bobriuc
Views 3092
Updated now 2 years
Published 28/06/2017
Enabling Cloudflare services in cPanelTutorials /Cloudflare
This article will describe the steps required to enable Cloudflare services for domains hosted on your cPanel control panel
5
by Mihai Bobriuc
Views 2117
Updated now 1 year
Published 26/09/2017
Adding an MX record to the cPanel admin panel, redirecting your mail server to GoogleTutorials /Email
How to add MX Records and forward mail to the Google mail server
1
by Mihai Bobriuc
Views 2162
Updated now 2 years
Published 21/07/2017
1
by Ana Rednic
Views 1997
Updated now 2 years
Published 31/01/2018
Enable DNSSEC in ROTLDTutorials /Domains
This tutorial will describe the steps required to enable DNSSEC on a .ro domain in the ROTLD panel
1
by Ana Rednic
Views 1590
Updated now 2 years
Published 25/10/2018